popDuration method
dynamic
popDuration(
- BuildContext context, {
- dynamic value,
- Duration duration = const Duration(milliseconds: 300),
Implementation
popDuration(BuildContext context,
{dynamic value, Duration duration = const Duration(milliseconds: 300)}) {
try {
Navigator.of(context).pop(
PageRouteBuilder(
pageBuilder: (_, __, ___) => Container(),
transitionDuration: duration,
transitionsBuilder: (_, animation, __, child) =>
FadeTransition(opacity: animation, child: child),
),
);
} catch (e) {}
}