Noor Dawod

Stop using shadowThemeOnly:true in Theme.of().

@@ -341,7 +341,8 @@ class CupertinoScaffold extends StatefulWidget { @@ -341,7 +341,8 @@ class CupertinoScaffold extends StatefulWidget {
341 assert(useRootNavigator != null); 341 assert(useRootNavigator != null);
342 assert(enableDrag != null); 342 assert(enableDrag != null);
343 assert(debugCheckHasMediaQuery(context)); 343 assert(debugCheckHasMediaQuery(context));
344 - final isCupertinoApp = Theme.of(context, shadowThemeOnly: true) == null; 344 + final isCupertinoApp =
  345 + context.findAncestorWidgetOfExactType<CupertinoApp>() != null;
345 var barrierLabel = ''; 346 var barrierLabel = '';
346 if (!isCupertinoApp) { 347 if (!isCupertinoApp) {
347 assert(debugCheckHasMaterialLocalizations(context)); 348 assert(debugCheckHasMaterialLocalizations(context));
@@ -39,7 +39,7 @@ Future<T> showMaterialModalBottomSheet<T>({ @@ -39,7 +39,7 @@ Future<T> showMaterialModalBottomSheet<T>({
39 elevation: elevation, 39 elevation: elevation,
40 shape: shape, 40 shape: shape,
41 clipBehavior: clipBehavior, 41 clipBehavior: clipBehavior,
42 - theme: Theme.of(context, shadowThemeOnly: true), 42 + theme: Theme.of(context),
43 ), 43 ),
44 secondAnimationController: secondAnimation, 44 secondAnimationController: secondAnimation,
45 bounce: bounce, 45 bounce: bounce,