TxModalBottomSheetRoute<T> constructor

TxModalBottomSheetRoute<T>(
  1. BuildContext context, {
  2. WidgetBuilder? builder,
  3. ThemeData? theme,
  4. String? barrierLabel,
  5. Color? backgroundColor,
  6. bool? isPersistent,
  7. double? elevation,
  8. ShapeBorder? shape,
  9. bool removeTop = true,
  10. Clip? clipBehavior,
  11. Color? modalBarrierColor,
  12. bool isDismissible = true,
  13. bool enableDrag = true,
  14. bool isScrollControlled = false,
  15. RouteSettings? settings,
  16. Duration enterBottomSheetDuration = const Duration(milliseconds: 250),
  17. Duration exitBottomSheetDuration = const Duration(milliseconds: 200),
  18. double? heightRatio,
})

构造函数参数说明: builder - 构建弹窗内容的构建器 theme - 自定义主题 barrierLabel - 无障碍标签 backgroundColor - 弹窗背景色 isPersistent - 是否持久化显示 elevation - 阴影高度 shape - 弹窗形状 removeTop - 是否移除顶部安全区域 clipBehavior - 裁剪行为 modalBarrierColor - 遮罩层颜色 isDismissible - 是否可点击遮罩关闭 enableDrag - 是否允许拖动关闭 isScrollControlled - 是否支持内容滚动 heightRatio - 弹窗高度占屏幕比例 (0.0-1.0) enterBottomSheetDuration - 进入动画时长 exitBottomSheetDuration - 退出动画时长

Implementation

TxModalBottomSheetRoute(
  BuildContext context, {
  this.builder,
  this.theme,
  this.barrierLabel,
  this.backgroundColor,
  this.isPersistent,
  this.elevation,
  this.shape,
  this.removeTop = true,
  this.clipBehavior,
  this.modalBarrierColor,
  this.isDismissible = true,
  this.enableDrag = true,
  this.isScrollControlled = false,
  RouteSettings? settings,
  this.enterBottomSheetDuration = const Duration(milliseconds: 250),
  this.exitBottomSheetDuration = const Duration(milliseconds: 200),
  this.heightRatio,
}) : super(settings: settings);