Skip to content

Instantly share code, notes, and snippets.

@MarcinusX
Created September 3, 2018 04:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MarcinusX/f09ea187c925e65934cf6c3ace1d9e68 to your computer and use it in GitHub Desktop.
Save MarcinusX/f09ea187c925e65934cf6c3ace1d9e68 to your computer and use it in GitHub Desktop.
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