show<T> static method
Future<T?>
show<T>({
- required BuildContext context,
- required Widget child,
- bool showHandle = true,
- bool showClose = true,
- bool isDismissible = true,
- bool enableDrag = true,
- EdgeInsetsGeometry? padding,
- List<
KinSheetDetent> detents = const [KinSheetDetent.large], - KinSheetDetent? initialDetent,
- List<
KinSheetCustomDetent> ? customDetents, - KinMaterial? material,
Show the sheet with iOS 18-style presentation.
detents — Which stops the sheet can rest at. Defaults to [large].
When both medium and large are provided, the sheet starts at medium
and can be dragged up to large.
initialDetent — Which detent to start at. Defaults to the smallest.
Implementation
static Future<T?> show<T>({
required BuildContext context,
required Widget child,
bool showHandle = true,
bool showClose = true,
bool isDismissible = true,
bool enableDrag = true,
EdgeInsetsGeometry? padding,
List<KinSheetDetent> detents = const [KinSheetDetent.large],
KinSheetDetent? initialDetent,
List<KinSheetCustomDetent>? customDetents,
KinMaterial? material,
}) {
return Navigator.of(context).push<T>(
_KinSheetModalRoute<T>(
isDismissible: isDismissible,
enableDrag: enableDrag,
detents: detents,
initialDetent: initialDetent ?? detents.first,
customDetents: customDetents,
child: KinSheet(
showHandle: showHandle,
showClose: showClose,
padding: padding,
material: material,
child: child,
),
),
);
}