build method
Widget
build(
- BuildContext context,
- Widget child,
- AnimationController controller,
- EffectEntry entry,
override
Builds the widgets necessary to implement the effect, based on the provided AnimationController and EffectEntry.
Implementation
@override
Widget build(
BuildContext context,
Widget child,
AnimationController controller,
EffectEntry entry,
) {
Animation<double> animation = entry.buildAnimation(controller);
return getOptimizedBuilder<double>(
animation: animation,
builder: (_, __) => DecoratedBox(
decoration: BoxDecoration(
boxShadow: [BoxShadow.lerp(begin, end, animation.value)!],
borderRadius: borderRadius,
),
child: child,
),
);
}