addBottomSheetPageRoute static method
void
addBottomSheetPageRoute(
- String name,
- RouteWidgetBuilder builder, {
- InheritedTheme? capturedThemes,
- Color? backgroundColor,
- double? elevation,
- ShapeBorder? shape,
- Clip? clipBehavior,
- BoxConstraints? constraints,
- bool? isScrollControlled,
- bool? isDismissible,
- bool? enableDrag,
- bool? showDragHandle,
- bool? useSafeArea,
- Color? barrierColor,
- String? barrierLabel,
- Offset? anchorPoint,
- double? scrollControlDisabledMaxHeightRatio = 9.0 / 16.0,
- TraversalEdgeBehavior? traversalEdgeBehavior,
- AnimationController? transitionAnimationController,
添加 BottomSheet 路由
Implementation
static void addBottomSheetPageRoute(
String name,
RouteWidgetBuilder builder, {
InheritedTheme? capturedThemes,
Color? backgroundColor,
final double? elevation,
final ShapeBorder? shape,
final Clip? clipBehavior,
final BoxConstraints? constraints,
final bool? isScrollControlled,
final bool? isDismissible,
final bool? enableDrag,
final bool? showDragHandle,
final bool? useSafeArea,
final Color? barrierColor,
final String? barrierLabel,
final bool? useRootNavigator,
final Offset? anchorPoint,
final double? scrollControlDisabledMaxHeightRatio = 9.0 / 16.0,
final TraversalEdgeBehavior? traversalEdgeBehavior,
final AnimationController? transitionAnimationController,
}) {
RouteOptions routeOptions = RouteOptions(
builder,
BottomSheetRouteOptions(
capturedThemes: capturedThemes,
backgroundColor: backgroundColor,
elevation: elevation,
shape: shape,
clipBehavior: clipBehavior,
constraints: constraints,
isScrollControlled: isScrollControlled,
isDismissible: isDismissible,
enableDrag: enableDrag,
showDragHandle: showDragHandle,
useSafeArea: useSafeArea,
barrierColor: barrierColor,
barrierLabel: barrierLabel,
useRootNavigator: useRootNavigator,
anchorPoint: anchorPoint,
scrollControlDisabledMaxHeightRatio: scrollControlDisabledMaxHeightRatio,
traversalEdgeBehavior: traversalEdgeBehavior,
transitionAnimationController: transitionAnimationController,
),
);
RouterManager.routes.putIfAbsent(name, () => routeOptions);
}