zenithShowModalBottomSheet<T> method
Future<T?>
zenithShowModalBottomSheet<T>({
- required Widget builder(
- BuildContext sheetContext
- bool isScrollControlled = false,
- bool isDismissible = true,
- Color? backgroundColor,
- ShapeBorder? shape,
Shows a modal bottom sheet with the parent ZenithTenantScope tunnelled into the sheet's widget subtree.
Implementation
Future<T?> zenithShowModalBottomSheet<T>({
required Widget Function(BuildContext sheetContext) builder,
bool isScrollControlled = false,
bool useRootNavigator = false,
bool isDismissible = true,
Color? backgroundColor,
ShapeBorder? shape,
}) {
final scope = ZenithScopeProvider.maybeOf(this);
return showModalBottomSheet<T>(
context: this,
isScrollControlled: isScrollControlled,
useRootNavigator: useRootNavigator,
isDismissible: isDismissible,
backgroundColor: backgroundColor,
shape: shape,
builder: (sheetContext) => scope != null
? ZenithScopeProvider(
scope: scope,
child: Builder(builder: builder),
)
: Builder(builder: builder),
);
}