Jaime Blasco
Committed by GitHub

Merge pull request #105 from noordawod/bugfix/theme-of

Fix a bug with latest version of Flutter.
... ... @@ -4,7 +4,7 @@
import 'dart:async';
import 'package:flutter/cupertino.dart' show CupertinoTheme;
import 'package:flutter/cupertino.dart' show CupertinoTheme, CupertinoApp;
import 'package:flutter/foundation.dart';
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart'
... ... @@ -341,7 +341,8 @@ class CupertinoScaffold extends StatefulWidget {
assert(useRootNavigator != null);
assert(enableDrag != null);
assert(debugCheckHasMediaQuery(context));
final isCupertinoApp = Theme.of(context, shadowThemeOnly: true) == null;
final isCupertinoApp =
context.findAncestorWidgetOfExactType<CupertinoApp>() != null;
var barrierLabel = '';
if (!isCupertinoApp) {
assert(debugCheckHasMaterialLocalizations(context));
... ...
... ... @@ -39,7 +39,7 @@ Future<T> showMaterialModalBottomSheet<T>({
elevation: elevation,
shape: shape,
clipBehavior: clipBehavior,
theme: Theme.of(context, shadowThemeOnly: true),
theme: Theme.of(context),
),
secondAnimationController: secondAnimation,
bounce: bounce,
... ...
name: modal_bottom_sheet
description: 'Create awesome and powerful modal bottom sheets. Material, Cupertino iOS 13 or create your own style'
version: 1.0.1-dev
version: 1.1.0-dev
homepage: 'https://github.com/jamesblasco/modal_bottom_sheet'
environment:
... ...