Instantly share code, notes, and snippets.

Embed
What would you like to do?
class AnimatedDot extends AnimatedWidget {
final Color color;
AnimatedDot({
Key key,
Animation<double> animation,
@required this.color,
}) : super(key: key, listenable: animation);
@override
Widget build(BuildContext context) {
Animation<double> animation = super.listenable;
return Positioned(
top: animation.value,
child: Container(
height: 24.0,
width: 24.0,
decoration: BoxDecoration(
color: Colors.white,
shape: BoxShape.circle,
border: Border.all(color: Color(0xFFDDDDDD), width: 1.0)),
child: Padding(
padding: const EdgeInsets.all(4.0),
child: DecoratedBox(
decoration: BoxDecoration(color: color, shape: BoxShape.circle),
),
)),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment