build method

  1. @override
Widget build(
  1. BuildContext context
)
override

Override this method to build widgets that depend on the state of the listenable (e.g., the current value of the animation).

Implementation

@override
Widget build(BuildContext context) {
  final Animation<double> animation = listenable as Animation<double>;
  return SizedBox(
    width: _radiusTween.evaluate(animation),
    height: _radiusTween.evaluate(animation),
    child: ClipOval(
      child: Opacity(
          opacity: _opacityTween.evaluate(animation),
          child: Container(
            decoration: BoxDecoration(
              gradient: LinearGradient(
                begin: Alignment.topCenter,
                end: Alignment.bottomCenter,
                colors: [color!, color2 ?? color!],
              ),
            ),
          )),
    ),
  );
}