TopSheet constructor

const TopSheet({
  1. required VoidCallback onClosing,
  2. required WidgetBuilder builder,
  3. Key? key,
  4. AnimationController? animationController,
  5. bool enableDrag = true,
  6. bool? showDragHandle,
  7. Color? dragHandleColor,
  8. Size? dragHandleSize,
  9. BottomSheetDragStartHandler? onDragStart,
  10. BottomSheetDragEndHandler? onDragEnd,
  11. Color? backgroundColor,
  12. Color? shadowColor,
  13. double? elevation,
  14. ShapeBorder? shape,
  15. Clip? clipBehavior,
  16. BoxConstraints? constraints,
  17. EdgeInsetsGeometry? padding,
})

创建顶部工作表。

通常,顶部工作表由 showModalTopSheet 隐式创建。

Implementation

const TopSheet({
  required this.onClosing,
  required this.builder,
  super.key,
  this.animationController,
  this.enableDrag = true,
  this.showDragHandle,
  this.dragHandleColor,
  this.dragHandleSize,
  this.onDragStart,
  this.onDragEnd,
  this.backgroundColor,
  this.shadowColor,
  this.elevation,
  this.shape,
  this.clipBehavior,
  this.constraints,
  this.padding,
}) : assert(elevation == null || elevation >= 0.0);