Committed by
GitHub
Merge pull request #105 from noordawod/bugfix/theme-of
Fix a bug with latest version of Flutter.
Showing
3 changed files
with
5 additions
and
4 deletions
@@ -4,7 +4,7 @@ | @@ -4,7 +4,7 @@ | ||
4 | 4 | ||
5 | import 'dart:async'; | 5 | import 'dart:async'; |
6 | 6 | ||
7 | -import 'package:flutter/cupertino.dart' show CupertinoTheme; | 7 | +import 'package:flutter/cupertino.dart' show CupertinoTheme, CupertinoApp; |
8 | import 'package:flutter/foundation.dart'; | 8 | import 'package:flutter/foundation.dart'; |
9 | import 'package:flutter/gestures.dart'; | 9 | import 'package:flutter/gestures.dart'; |
10 | import 'package:flutter/material.dart' | 10 | import 'package:flutter/material.dart' |
@@ -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, |
1 | name: modal_bottom_sheet | 1 | name: modal_bottom_sheet |
2 | description: 'Create awesome and powerful modal bottom sheets. Material, Cupertino iOS 13 or create your own style' | 2 | description: 'Create awesome and powerful modal bottom sheets. Material, Cupertino iOS 13 or create your own style' |
3 | -version: 1.0.1-dev | 3 | +version: 1.1.0-dev |
4 | homepage: 'https://github.com/jamesblasco/modal_bottom_sheet' | 4 | homepage: 'https://github.com/jamesblasco/modal_bottom_sheet' |
5 | 5 | ||
6 | environment: | 6 | environment: |
-
Please register or login to post a comment