I wanted to know if it was possible to add blur on a screen with fade in and fade out.
Do you have any idea ? I'm currently using BackDropFilter to blur my screen but it doesn't fade when appear...
You can animate the sigma values for blur,
TweenAnimationBuilder<double>(
tween: Tween<double>(begin: 0.0, end: 15.0),
duration: const Duration(milliseconds: 500),
builder: (_, value, child) {
return BackdropFilter(
filter: ImageFilter.blur(sigmaX: value, sigmaY: value),
child: child,
);
},
child: DecoratedBox(
decoration: BoxDecoration(
color: Colors.white.withOpacity(0.5),
),
),
https://api.flutter.dev/flutter/widgets/TweenAnimationBuilder-class.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With