Skip to content

Commit

Permalink
Merge pull request #122 from akshathjain/dev
Browse files Browse the repository at this point in the history
v1.0.1 - snapPoint, Performance and Bug Fixes
  • Loading branch information
akshathjain authored Apr 2, 2020
2 parents 781c7d4 + d56cbad commit d7cd9d9
Show file tree
Hide file tree
Showing 7 changed files with 183 additions and 75 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
## [1.0.1] - [April 2, 2020]
### Fixes
- Addressed issue #94: Too much widget rebuild occurring when using PanelBuilder. This fix results in huge performance benefits when using the `panelChild` property
- Addressed issues #102, #111: Fixed issue where tapping on the panel closes it (when using the `panelBuilder`)
- Addressed issues #24, #70, #108, #121: Changed `backdropTapClosesPanel` to use `onTap` and `onVerticalDragEnd` so swipes on the backdrop cause the panel to close

### Features
- Addressed issue #107: Added duration and curve properties to the `PanelController`'s `animatePanelToPosition` method
- Addressed issues #12,#77,#86,#100: Added a `snapPoint` property to allow the panel to snap to a position midway during its slide

### Documentation
- Updated documentation to reflect new features and fixes
- Updated copyright year in the LICENSE

## [1.0.0] - [January 25, 2020]

#### Fixes
Expand Down
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2019, Akshath Jain
Copyright (c) 2020, Akshath Jain
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand All @@ -11,7 +11,7 @@ modification, are permitted provided that the following conditions are met:
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

* All use of this software must display the following acknowledgement: This
* All use of this software must display the following acknowledgement: This
product includes software developed by Akshath Jain (https://akshathjain.com).

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ A draggable Flutter widget that makes implementing a SlidingUpPanel much easier!
Add the following to your `pubspec.yaml` file:
```yaml
dependencies:
sliding_up_panel: ^1.0.0
sliding_up_panel: ^1.0.1
```
Note that `v1.0.0` introduced some breaking changes outlined [below](#breaking-changes).

Expand Down Expand Up @@ -99,6 +99,7 @@ There are several options that allow for more control:
| `body` | The Widget that lies underneath the sliding panel. This Widget automatically sizes itself to fill the screen. |
| `minHeight` | The height of the sliding panel when fully collapsed. |
| `maxHeight` | The height of the sliding panel when fully open. |
| `snapPoint` [beta] | A point between `minHeight` and `maxHeight` that the panel snaps to while animating. A fast swipe on the panel will disregard this point and go directly to the open/close position. This value is represented as a percentage of the total animation distance (`maxHeight` - `minHeight`), so it must be between 0.0 and 1.0, exclusive. |
| `border` | A border to draw around the sliding panel sheet. |
| `borderRadius` | If non-null, the corners of the sliding panel sheet are rounded by this. |
| `boxShadow` | A list of shadows cast behind the sliding panel sheet. |
Expand Down Expand Up @@ -441,7 +442,8 @@ At times, it can be useful to manually change the state of the `SlidingUpPanel`.
|`close()`| `Future<void>` | Closes the sliding panel to its collapsed state (i.e. to the `minHeight`) |
|`hide()`| `Future<void>` | Hides the sliding panel (i.e. is invisible) |
|`show()`| `Future<void>` | Shows the sliding panel in its collapsed state (i.e. "un-hide" the sliding panel) |
|`animatePanelToPosition(double value)`| `Future<void>` | Animates the panel position to the value. The value must between 0.0 and 1.0 where 0.0 is fully collapsed and 1.0 is completely open. |
|`animatePanelToPosition(double value, {Duration duration, Curve curve = Curves.linear})`| `Future<void>` | Animates the panel position to the value. The value must between 0.0 and 1.0 where 0.0 is fully collapsed and 1.0 is completely open. (optional) `duration` specifies the time for the animation to complete. (optional) `curve` specifies the easing behavior of the animation. |
|`animatePanelToSnapPoint(double value, {Duration duration, Curve curve = Curves.linear})` [beta]| `Future<void>` | Animates the panel position to the snap point. Requires that the SlidingUpPanel `snapPoint` property is not null. (optional) `duration` specifies the time for the animation to complete. (optional) `curve` specifies the easing behavior of the animation. |


```dart
Expand Down
17 changes: 17 additions & 0 deletions example/android/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>android_</name>
<comment>Project android_ created by Buildship.</comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
</natures>
</projectDescription>
2 changes: 2 additions & 0 deletions example/android/.settings/org.eclipse.buildship.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
connection.project.dir=
eclipse.preferences.version=1
Loading

0 comments on commit d7cd9d9

Please sign in to comment.