Skip to content

Commit

Permalink
Prepare for 0.1.5 release
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesblasco committed Apr 15, 2020
1 parent bf6247b commit 2c249c5
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
7 changes: 4 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

## [0.1.4] - Clean code and fix small bugs

## [0.1.5] - Bugfixes
- fix assertion in CupertinoBottomSheet and BottomSheetRoute when using the CupetinoApp or WidgetsApp as root
- fix assertion when scrollController isn't used by the builder
## [0.1.5] - Scroll improvements and bug fixes
- Support for closing a modal with a scroll view by dragging down fast.
- Fix assertion in CupertinoBottomSheet and BottomSheetRoute when using the CupetinoApp or WidgetsApp as root
- Fix assertion when scrollController isn't used by the builder
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ Check in the example project `showAvatarModalBottomSheet` for how to create your

## Roadmap

- [ ] Support closing by dragging fast on a modal with a scroll view.
- [ X ] Support closing by dragging fast on a modal with a scroll view.

- [ ] Improve animation curves when user is not dragging.

Expand Down
3 changes: 2 additions & 1 deletion example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,8 @@ class _MyHomePageState extends State<MyHomePage> {
scrollController: scrollController),
)),
ListTile(
title: Text('Cupertino Navigator + Scroll + WillPopScope'),
title:
Text('Cupertino Navigator + Scroll + WillPopScope'),
onTap: () => showCupertinoModalBottomSheet(
expand: true,
context: context,
Expand Down
4 changes: 1 addition & 3 deletions lib/src/bottom_sheet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,6 @@ class _ModalBottomSheetState extends State<ModalBottomSheet>
}
}


// As we cannot access the dragGesture detector of the scroll view
// we can not know the DragDownDetails and therefore the end velocity.
// VelocityTracker it is used to calculate the end velocity of the scroll
Expand Down Expand Up @@ -257,8 +256,7 @@ class _ModalBottomSheetState extends State<ModalBottomSheet>
final offset = Offset(0, _scrollController.offset);
_velocityTracker.addPosition(duration, offset);
_handleDragUpdate(dragDetails.primaryDelta);
}
else if (isDragging) {
} else if (isDragging) {
final velocity = _velocityTracker.getVelocity().pixelsPerSecond.dy;
_handleDragEnd(velocity);
}
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: modal_bottom_sheet
description: 'Create awesome and powerful modal bottom sheets. Material, Cupertino or create your own'
description: 'Create awesome and powerful modal bottom sheets. Material, Cupertino iOS 13 or create your own style'
version: 0.1.5
homepage: 'https://github.com/jamesblasco/modal_bottom_sheet'

Expand Down

0 comments on commit 2c249c5

Please sign in to comment.