Showing
5 changed files
with
9 additions
and
9 deletions
| @@ -4,6 +4,7 @@ | @@ -4,6 +4,7 @@ | ||
| 4 | 4 | ||
| 5 | ## [0.1.4] - Clean code and fix small bugs | 5 | ## [0.1.4] - Clean code and fix small bugs |
| 6 | 6 | ||
| 7 | -## [0.1.5] - Bugfixes | ||
| 8 | -- fix assertion in CupertinoBottomSheet and BottomSheetRoute when using the CupetinoApp or WidgetsApp as root | ||
| 9 | -- fix assertion when scrollController isn't used by the builder | ||
| 7 | +## [0.1.5] - Scroll improvements and bug fixes | ||
| 8 | +- Support for closing a modal with a scroll view by dragging down fast. | ||
| 9 | +- Fix assertion in CupertinoBottomSheet and BottomSheetRoute when using the CupetinoApp or WidgetsApp as root | ||
| 10 | +- Fix assertion when scrollController isn't used by the builder |
| @@ -187,7 +187,7 @@ Check in the example project `showAvatarModalBottomSheet` for how to create your | @@ -187,7 +187,7 @@ Check in the example project `showAvatarModalBottomSheet` for how to create your | ||
| 187 | 187 | ||
| 188 | ## Roadmap | 188 | ## Roadmap |
| 189 | 189 | ||
| 190 | -- [ ] Support closing by dragging fast on a modal with a scroll view. | 190 | +- [ X ] Support closing by dragging fast on a modal with a scroll view. |
| 191 | 191 | ||
| 192 | - [ ] Improve animation curves when user is not dragging. | 192 | - [ ] Improve animation curves when user is not dragging. |
| 193 | 193 |
| @@ -194,7 +194,8 @@ class _MyHomePageState extends State<MyHomePage> { | @@ -194,7 +194,8 @@ class _MyHomePageState extends State<MyHomePage> { | ||
| 194 | scrollController: scrollController), | 194 | scrollController: scrollController), |
| 195 | )), | 195 | )), |
| 196 | ListTile( | 196 | ListTile( |
| 197 | - title: Text('Cupertino Navigator + Scroll + WillPopScope'), | 197 | + title: |
| 198 | + Text('Cupertino Navigator + Scroll + WillPopScope'), | ||
| 198 | onTap: () => showCupertinoModalBottomSheet( | 199 | onTap: () => showCupertinoModalBottomSheet( |
| 199 | expand: true, | 200 | expand: true, |
| 200 | context: context, | 201 | context: context, |
| @@ -225,7 +225,6 @@ class _ModalBottomSheetState extends State<ModalBottomSheet> | @@ -225,7 +225,6 @@ class _ModalBottomSheetState extends State<ModalBottomSheet> | ||
| 225 | } | 225 | } |
| 226 | } | 226 | } |
| 227 | 227 | ||
| 228 | - | ||
| 229 | // As we cannot access the dragGesture detector of the scroll view | 228 | // As we cannot access the dragGesture detector of the scroll view |
| 230 | // we can not know the DragDownDetails and therefore the end velocity. | 229 | // we can not know the DragDownDetails and therefore the end velocity. |
| 231 | // VelocityTracker it is used to calculate the end velocity of the scroll | 230 | // VelocityTracker it is used to calculate the end velocity of the scroll |
| @@ -257,8 +256,7 @@ class _ModalBottomSheetState extends State<ModalBottomSheet> | @@ -257,8 +256,7 @@ class _ModalBottomSheetState extends State<ModalBottomSheet> | ||
| 257 | final offset = Offset(0, _scrollController.offset); | 256 | final offset = Offset(0, _scrollController.offset); |
| 258 | _velocityTracker.addPosition(duration, offset); | 257 | _velocityTracker.addPosition(duration, offset); |
| 259 | _handleDragUpdate(dragDetails.primaryDelta); | 258 | _handleDragUpdate(dragDetails.primaryDelta); |
| 260 | - } | ||
| 261 | - else if (isDragging) { | 259 | + } else if (isDragging) { |
| 262 | final velocity = _velocityTracker.getVelocity().pixelsPerSecond.dy; | 260 | final velocity = _velocityTracker.getVelocity().pixelsPerSecond.dy; |
| 263 | _handleDragEnd(velocity); | 261 | _handleDragEnd(velocity); |
| 264 | } | 262 | } |
| 1 | name: modal_bottom_sheet | 1 | name: modal_bottom_sheet |
| 2 | -description: 'Create awesome and powerful modal bottom sheets. Material, Cupertino or create your own' | 2 | +description: 'Create awesome and powerful modal bottom sheets. Material, Cupertino iOS 13 or create your own style' |
| 3 | version: 0.1.5 | 3 | version: 0.1.5 |
| 4 | homepage: 'https://github.com/jamesblasco/modal_bottom_sheet' | 4 | homepage: 'https://github.com/jamesblasco/modal_bottom_sheet' |
| 5 | 5 |
-
Please register or login to post a comment