animateWidgetFloatWithShadow method
Widget
animateWidgetFloatWithShadow(
{ - int durationMs = 1500,
- Color shadowColor = Colors.black,
- bool repeat = true,
- bool animate = true,
})
Implementation
Widget animateWidgetFloatWithShadow(
{int durationMs = 1500,
Color shadowColor = Colors.black,
bool repeat = true,
bool animate = true}) {
if (!animate) return this;
return _baseAnimate(repeat: repeat, reverse: true)
.moveY(
begin: 0,
end: -10,
duration: durationMs.ms,
curve: Curves.easeInOut)
.custom(
duration: durationMs.ms,
builder: (_, v, c) => Container(
decoration: BoxDecoration(
boxShadow: [
BoxShadow(
color: shadowColor.withColorOpacity(0.1 * (1 - v)),
blurRadius: 10 * v,
offset: Offset(0, 15 * v))
],
),
child: c,
),
);
}