createRoute method Null safety

Route<T> createRoute(
  1. BuildContext context
)
override

Creates the Route that corresponds to this page.

The created Route must have its Route.settings property set to this Page.

Implementation

@override
Route<T> createRoute(BuildContext context) => CupertinoModalBottomSheetRoute(
      settings: this,
      builder: (context) => Material(child: child),
      containerBuilder: (context, animation, child) => _SheetContainer(
        topRadius: topRadius ?? UnTheme.screenCornerRadius(context),
        backgroundColor: backgroundColor,
        child: child,
      ),
      secondAnimationController: secondAnimation,
      expanded: expand,
      closeProgressThreshold: closeProgressThreshold,
      barrierLabel: Localizations.of<MaterialLocalizations>(
                context,
                MaterialLocalizations,
              ) !=
              null
          ? MaterialLocalizations.of(context).modalBarrierDismissLabel
          : '',
      elevation: elevation,
      bounce: bounce,
      shape: shape,
      clipBehavior: clipBehavior,
      isDismissible: isDismissible ?? !expand ? true : false,
      modalBarrierColor: barrierColor ?? Colors.black12,
      enableDrag: enableDrag,
      topRadius: topRadius ?? UnTheme.screenCornerRadius(context),
      animationCurve: animationCurve,
      previousRouteAnimationCurve: previousRouteAnimationCurve,
      duration: duration,
      transitionBackgroundColor: transitionBackgroundColor ?? Colors.black,
      overlayStyle: overlayStyle,
    );