-
-
Save MarcinusX/f09ea187c925e65934cf6c3ace1d9e68 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
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