Created
January 23, 2020 18:21
-
-
Save SandroMaglione/e0d75345156e8fe9b925b921219a1f61 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
import 'package:step_progress_indicator/step_progress_indicator.dart'; | |
class ExampleStepProgressIndicator extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
body: Column( | |
mainAxisAlignment: MainAxisAlignment.center, | |
children: <Widget>[ | |
StepProgressIndicator( | |
totalSteps: 10, | |
customColor: (index) { | |
if (index % 2 == 0) { | |
return Colors.green; | |
} else { | |
return Colors.black; | |
} | |
}, | |
height: 36.0, | |
padding: 6.0, | |
), | |
], | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment