ZenithScopeBridgeX extension

BuildContext extension providing zenithShowModalBottomSheet, a drop-in replacement for showModalBottomSheet that preserves the parent ZenithTenantScope across the Navigator boundary.

Standard showModalBottomSheet creates a new route, breaking the InheritedWidget chain and making scope-resolved dependencies unavailable in the sheet's BuildContext. zenithShowModalBottomSheet re-injects a ZenithScopeProvider into the sheet so that sheetContext.zenith(key) resolves correctly.

context.zenithShowModalBottomSheet(
  builder: (sheetContext) => Text(sheetContext.zenith(userAliasKey)),
);
on

Methods

zenithShowModalBottomSheet<T>({required Widget builder(BuildContext sheetContext), bool isScrollControlled = false, bool useRootNavigator = false, bool isDismissible = true, Color? backgroundColor, ShapeBorder? shape}) → Future<T?>

Available on BuildContext, provided by the ZenithScopeBridgeX extension

Shows a modal bottom sheet with the parent ZenithTenantScope tunnelled into the sheet's widget subtree.