Skip to content

Instantly share code, notes, and snippets.

@roketstorm
Last active June 17, 2019 04:16
Show Gist options
  • Save roketstorm/855c8924d796c1939021f9bd0390230e to your computer and use it in GitHub Desktop.
Save roketstorm/855c8924d796c1939021f9bd0390230e to your computer and use it in GitHub Desktop.
int _current;
List<Widget> items = [
GoalStep1(),
GoalStep2(),
GoalStep3(),
GoalStep4(),
GoalStep5()
];
Positioned(
bottom: 16.0,
left: 0.0,
right: 0.0,
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: items.map((index) {
return Container(
width: 8.0,
height: 8.0,
margin: EdgeInsets.symmetric(
vertical: 10.0, horizontal: 5.0),
decoration: BoxDecoration(
shape: BoxShape.circle,
border: Border.all(color: Color.fromRGBO(57, 60, 79, 1.0)),
color: _current == items.indexOf(index)
? Color.fromRGBO(57, 60, 79, 1.0)
: Color.fromRGBO(255, 255, 255, 1.0)),
);
}).toList()),
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment