Skip to content

Instantly share code, notes, and snippets.

@SandroMaglione
Created January 23, 2020 18:21
Show Gist options
  • Save SandroMaglione/e0d75345156e8fe9b925b921219a1f61 to your computer and use it in GitHub Desktop.
Save SandroMaglione/e0d75345156e8fe9b925b921219a1f61 to your computer and use it in GitHub Desktop.
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