Jaime Blasco
Committed by GitHub

fix: flutter 3.7 (#324)

* fix: deprecate duplicated name

* fix: support flutter 3.7

* feat: add pre release version
## 3.0.0-pre - Flutter 3.7
+ Migrates to Flutter 3.7
+ ModalBottomSheetRoute has been renamed to ModalSheetRoute so it does not conflict with the new class from Flutter 3.7
## 2.1.1
+ Bug fixes
... ...
... ... @@ -260,7 +260,7 @@ class _MyHomePageState extends State<MyHomePage> {
padding: EdgeInsets.fromLTRB(16, 20, 16, 8),
child: Text(
title,
style: Theme.of(context).textTheme.caption,
style: Theme.of(context).textTheme.bodySmall,
),
);
}
... ...
... ... @@ -254,4 +254,4 @@ packages:
version: "2.1.4"
sdks:
dart: ">=2.18.0 <4.0.0"
flutter: ">=3.0.0"
flutter: ">=3.7.0"
... ...
... ... @@ -14,8 +14,8 @@ publish_to: none
version: 1.0.0+1
environment:
flutter: ">=3.0.0"
sdk: '>=2.17.0 <3.0.0'
flutter: ">=3.7.0"
dependencies:
... ...
... ... @@ -75,7 +75,7 @@ class _ModalBottomSheetState<T> extends State<_ModalBottomSheet<T>> {
Widget build(BuildContext context) {
assert(debugCheckHasMediaQuery(context));
assert(widget.route._animationController != null);
final scrollController = PrimaryScrollController.of(context) ??
final scrollController = PrimaryScrollController.maybeOf(context) ??
(_scrollController ??= ScrollController());
return ModalScrollController(
controller: scrollController,
... ... @@ -122,12 +122,6 @@ class _ModalBottomSheetState<T> extends State<_ModalBottomSheet<T>> {
}
}
@Deprecated(
'ModalBottomSheetRoute has been introduced in Flutter 3.7, to avoid name '
'conflicts, this class has been renamed to ModalSheetRoute in this '
'packages. ModalBottomSheetRoute will be removed in the next major version.')
typedef ModalBottomSheetRoute<T> = ModalSheetRoute<T>;
class ModalSheetRoute<T> extends PageRoute<T> {
ModalSheetRoute({
this.closeProgressThreshold,
... ...
... ... @@ -491,11 +491,6 @@ class _CupertinoScaffoldState extends State<CupertinoScaffold>
}
@override
void dispose() {
super.dispose();
}
@override
Widget build(BuildContext context) {
return CupertinoScaffoldInheirted(
animation: animationController,
... ...
... ... @@ -170,4 +170,4 @@ packages:
version: "2.1.4"
sdks:
dart: ">=2.18.0 <4.0.0"
flutter: ">=3.0.0"
flutter: ">=3.7.0"
... ...
name: modal_bottom_sheet
description: 'Create awesome and powerful modal bottom sheets. Material, Cupertino iOS 13 or create your own style'
version: 2.1.2
version: 3.0.0-pre
homepage: 'https://github.com/jamesblasco/modal_bottom_sheet'
environment:
sdk: ">=2.17.0 <3.0.0"
flutter: ">=3.0.0"
flutter: ">=3.7.0"
dependencies:
flutter:
... ...
## [0.0.1] - TODO: Add release date.
# [1.0.0-pre] - Adds support for Flutter 3.7
* TODO: Describe initial release.
* This version requires Flutter 3.7 as the new framework version contains several breaking changes that affect the package
... ...
... ... @@ -87,7 +87,7 @@ class ListWidget extends StatelessWidget {
return Container(
child: Text(
'Location',
style: Theme.of(context).textTheme.headline6,
style: Theme.of(context).textTheme.titleLarge,
),
padding: const EdgeInsets.all(20),
alignment: Alignment.center,
... ...
... ... @@ -329,7 +329,7 @@ class SectionTitle extends StatelessWidget {
padding: const EdgeInsets.all(16),
child: Text(
text,
style: Theme.of(context).textTheme.headline6,
style: Theme.of(context).textTheme.titleLarge,
),
);
}
... ...
... ... @@ -7,7 +7,7 @@ class ComplexModal extends StatelessWidget {
@override
Widget build(BuildContext context) {
final ScrollController primaryScrollController =
PrimaryScrollController.of(context)!;
PrimaryScrollController.maybeOf(context)!;
return Material(
child: WillPopScope(
onWillPop: () async {
... ...
... ... @@ -145,8 +145,8 @@ class BookDetailsScreen extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
Text(book.title, style: Theme.of(context).textTheme.headline6),
Text(book.author, style: Theme.of(context).textTheme.subtitle1),
Text(book.title, style: Theme.of(context).textTheme.titleLarge),
Text(book.author, style: Theme.of(context).textTheme.titleMedium),
],
),
),
... ...
... ... @@ -158,8 +158,8 @@ class BookDetailsScreen extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
Text(book.title, style: Theme.of(context).textTheme.headline6),
Text(book.author, style: Theme.of(context).textTheme.subtitle1),
Text(book.title, style: Theme.of(context).textTheme.titleLarge),
Text(book.author, style: Theme.of(context).textTheme.titleMedium),
],
),
),
... ...
... ... @@ -145,8 +145,8 @@ class BookDetailsScreen extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
Text(book.title, style: Theme.of(context).textTheme.headline6),
Text(book.author, style: Theme.of(context).textTheme.subtitle1),
Text(book.title, style: Theme.of(context).textTheme.titleLarge),
Text(book.author, style: Theme.of(context).textTheme.titleMedium),
],
),
),
... ...
... ... @@ -291,7 +291,7 @@ class MapSheet extends StatelessWidget {
child: Text(
'Latest near you',
style:
Theme.of(context).textTheme.headline6,
Theme.of(context).textTheme.titleLarge,
),
padding: EdgeInsets.all(20),
alignment: Alignment.centerLeft,
... ...
... ... @@ -31,7 +31,7 @@ class ScrollableSheet extends StatelessWidget {
return Container(
child: Text(
'Location',
style: Theme.of(context).textTheme.headline6,
style: Theme.of(context).textTheme.titleLarge,
),
padding: const EdgeInsets.all(20),
alignment: Alignment.center,
... ...
... ... @@ -36,7 +36,7 @@ class ScrollableSnapSheet extends StatelessWidget {
return Container(
child: Text(
'Location',
style: Theme.of(context).textTheme.headline6,
style: Theme.of(context).textTheme.titleLarge,
),
padding: const EdgeInsets.all(20),
alignment: Alignment.center,
... ...
... ... @@ -14,8 +14,8 @@ class SimpleSheet extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
const SizedBox(height: 20),
Text('Title', style: Theme.of(context).textTheme.headline3),
Text('Subtitle', style: Theme.of(context).textTheme.headline6),
Text('Title', style: Theme.of(context).textTheme.displaySmall),
Text('Subtitle', style: Theme.of(context).textTheme.titleLarge),
],
),
),
... ...
... ... @@ -324,7 +324,7 @@ class SectionTitle extends StatelessWidget {
padding: const EdgeInsets.fromLTRB(16, 20, 16, 8),
child: Text(
title,
style: Theme.of(context).textTheme.caption,
style: Theme.of(context).textTheme.bodySmall,
),
);
}
... ...
... ... @@ -86,7 +86,7 @@ class SectionTitle extends StatelessWidget {
padding: const EdgeInsets.fromLTRB(16, 20, 16, 8),
child: Text(
title,
style: Theme.of(context).textTheme.caption,
style: Theme.of(context).textTheme.bodySmall,
),
);
}
... ...
... ... @@ -222,4 +222,4 @@ packages:
version: "2.1.4"
sdks:
dart: ">=2.18.0 <4.0.0"
flutter: ">=3.3.0"
flutter: ">=3.7.0"
... ...
... ... @@ -5,7 +5,7 @@ version: 1.0.0+1
environment:
sdk: ">=2.17.0 <3.0.0"
flutter: ">=3.0.0"
flutter: ">=3.7.0"
dependencies:
flutter:
... ...
... ... @@ -139,6 +139,7 @@ class SheetPrimaryScrollPosition extends ScrollPositionWithSingleContext {
velocity,
),
context.vsync,
true,
),
);
... ... @@ -178,6 +179,7 @@ class SheetPrimaryScrollPosition extends ScrollPositionWithSingleContext {
velocity,
),
context.vsync,
true,
),
);
return;
... ...
... ... @@ -49,7 +49,8 @@ class ScrollToTopStatusBarState extends State<ScrollToTopStatusBarHandler> {
}
void _handleStatusBarTap(BuildContext context) {
final ScrollController? controller = PrimaryScrollController.of(context);
final ScrollController? controller =
PrimaryScrollController.maybeOf(context);
if (controller != null && controller.hasClients) {
controller.animateTo(
0.0,
... ...
... ... @@ -434,4 +434,4 @@ packages:
version: "3.1.1"
sdks:
dart: ">=2.18.0 <4.0.0"
flutter: ">=3.3.0"
flutter: ">=3.7.0"
... ...
name: sheet
description: A fully customizable draggable bottom sheet.
version: 0.0.4+1
version: 1.0.0-pre
homepage: https://github.com/jamesblasco/modal_bottom_sheet
environment:
sdk: ">=2.17.0 <3.0.0"
flutter: ">=3.3.0"
flutter: ">=3.7.0"
dependencies:
flutter:
... ...