openBaseDrawer<T> function

Future<T> openBaseDrawer<T>(
  1. BuildContext context,
  2. BaseDrawer drawer,
  3. {bool rootNavigator = true}
)

Implementation

Future<T> openBaseDrawer<T>(
  BuildContext context,
  BaseDrawer drawer, {
  bool rootNavigator = true,
}) {
  return Navigator.of(
    context,
    rootNavigator: rootNavigator,
  ).push<T>(
    PageRouteBuilder<T>(
      opaque: false,
      transitionDuration: drawer.duration,
      pageBuilder: (
        BuildContext context,
        Animation<double> animation,
        Animation<double> secondaryAnimation,
      ) {
        return drawer;
      },
    ),
  );
}