Showing
5 changed files
with
18 additions
and
7 deletions
| 1 | -## [0.2.1+1-dev] - Fix Flutter 22 breaking change | 1 | +## [0.2.1+2] - Reverse fix Flutter 22 beta breaking change |
| 2 | +- https://github.com/jamesblasco/modal_bottom_sheet/issues/69 | ||
| 3 | + | ||
| 4 | +## [0.2.1+1-dev] - Fix Flutter 22 beta breaking change | ||
| 2 | - https://github.com/jamesblasco/modal_bottom_sheet/issues/69 | 5 | - https://github.com/jamesblasco/modal_bottom_sheet/issues/69 |
| 3 | 6 | ||
| 4 | ## [0.2.0+1] - ScrollView bug fix | 7 | ## [0.2.0+1] - ScrollView bug fix |
| @@ -8,6 +8,7 @@ class ModalWithNavigator extends StatelessWidget { | @@ -8,6 +8,7 @@ class ModalWithNavigator extends StatelessWidget { | ||
| 8 | 8 | ||
| 9 | @override | 9 | @override |
| 10 | Widget build(BuildContext context) { | 10 | Widget build(BuildContext context) { |
| 11 | + | ||
| 11 | return Material( | 12 | return Material( |
| 12 | child: Navigator( | 13 | child: Navigator( |
| 13 | onGenerateRoute: (_) => MaterialPageRoute( | 14 | onGenerateRoute: (_) => MaterialPageRoute( |
| @@ -27,15 +28,22 @@ class ModalWithNavigator extends StatelessWidget { | @@ -27,15 +28,22 @@ class ModalWithNavigator extends StatelessWidget { | ||
| 27 | (index) => ListTile( | 28 | (index) => ListTile( |
| 28 | title: Text('Item'), | 29 | title: Text('Item'), |
| 29 | onTap: () { | 30 | onTap: () { |
| 30 | - Navigator.of(context).push(MaterialPageRoute( | 31 | + Navigator.of(context).pushAndRemoveUntil(MaterialPageRoute( |
| 31 | builder: (context) => CupertinoPageScaffold( | 32 | builder: (context) => CupertinoPageScaffold( |
| 32 | navigationBar: CupertinoNavigationBar( | 33 | navigationBar: CupertinoNavigationBar( |
| 33 | middle: Text('New Page'), | 34 | middle: Text('New Page'), |
| 34 | ), | 35 | ), |
| 35 | child: Stack( | 36 | child: Stack( |
| 36 | fit: StackFit.expand, | 37 | fit: StackFit.expand, |
| 37 | - children: <Widget>[], | ||
| 38 | - )))); | 38 | + children: <Widget>[ |
| 39 | + MaterialButton( | ||
| 40 | + onPressed: () => Navigator.of(context).pop(), | ||
| 41 | + child: Text('touch here'), | ||
| 42 | + ) | ||
| 43 | + ], | ||
| 44 | + ) | ||
| 45 | + ) | ||
| 46 | + ), ModalRoute.withName('/')); | ||
| 39 | }, | 47 | }, |
| 40 | )), | 48 | )), |
| 41 | ).toList(), | 49 | ).toList(), |
| @@ -92,7 +92,7 @@ packages: | @@ -92,7 +92,7 @@ packages: | ||
| 92 | path: ".." | 92 | path: ".." |
| 93 | relative: true | 93 | relative: true |
| 94 | source: path | 94 | source: path |
| 95 | - version: "0.2.1+1-dev" | 95 | + version: "0.2.1+2" |
| 96 | path: | 96 | path: |
| 97 | dependency: transitive | 97 | dependency: transitive |
| 98 | description: | 98 | description: |
| @@ -300,7 +300,7 @@ class _ModalBottomSheetState extends State<ModalBottomSheet> | @@ -300,7 +300,7 @@ class _ModalBottomSheetState extends State<ModalBottomSheet> | ||
| 300 | // Otherwise the calculate the velocity with a VelocityTracker | 300 | // Otherwise the calculate the velocity with a VelocityTracker |
| 301 | if (_velocityTracker == null) { | 301 | if (_velocityTracker == null) { |
| 302 | final pointerKind = defaultPointerDeviceKind(context); | 302 | final pointerKind = defaultPointerDeviceKind(context); |
| 303 | - _velocityTracker = VelocityTracker(pointerKind); | 303 | + _velocityTracker = VelocityTracker(); |
| 304 | _startTime = DateTime.now(); | 304 | _startTime = DateTime.now(); |
| 305 | } | 305 | } |
| 306 | DragUpdateDetails dragDetails; | 306 | DragUpdateDetails dragDetails; |
| 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: 0.2.1+1-dev | 3 | +version: 0.2.1+2 |
| 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