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