sliding_panel 1.3.2
sliding_panel: ^1.3.2 copied to clipboard
The most customisable bottom sliding panel you can find on pub.dev. Just as you want it!
1.3.2 14 October, 2020 #
- Use built-in AppBar for
PanelHeaderWidgetinstead of custom implementation.
1.3.1 11 August, 2020 #
-
Fixed:
PanelHeaderWidgetdid not respect thePanelHeaderOptions.centerTitle. -
Fixed: When using modal panels with
SafeAreaConfig, if the panel's content was larger, the top padding was not applied properly. -
Fixed: If panel was put in Scaffold without
AppBar, panel occupied more space unnecessarily.
1.3.0 09 July, 2020 #
-
Fixed: When
PanelHeaderWidgetwas removed from panel at runtime and then usingPanelController.rebuild()caused the header's height being miscalculated. #21 (Thanks to @FilipeLarga) -
Breaking change: The parameter
allowedDraggingTillis now completely removed. It was deprecated sincev1.0.3.
1.2.4 22 June, 2020 #
-
Fixed: When
snapping: PanelSnapping.disabledwas used, the panel did not receive gestures if it was in between closed and expanded position. #19 (Thanks to @Warpath) -
Fixed: When panel's height was manipulated (e.g.,
PanelController.setAnimatedPanelPosition()) with the content of panel itself, it tried to reset its position.
1.2.3 May 25, 2020 #
- Fixed: When
SlidingPanelwas put inside aStackwidget, the content behind Panel, was not receiving gestures. #15 (Thanks to @live9080)
1.2.2 May 09, 2020 #
-
Fixed: TextTheme deprecation warnings.
-
Fixed: Some analyzer warnings of missing case clauses.
-
New: Use
SafeAreaConfig.bodyHasSliversif you plan to use Slivers inPanelContent.bodyContent.
1.2.1 April 22, 2020 #
-
Change: From now, the default
safeAreaConfigwill beSafeAreaConfig.all(). -
New:
SafeAreaConfig.removePaddingFromContentadded, that controls whether to remove auto-padding from panel content as well. -
Fixed: When giving
animatedAppearing: trueor using amodalpanel, rotating the device mistakenly moved the panel toinitialPanelState. -
Fixed: When using a
modalpanel, rotating the device and closing the panel would not restore control back to parent. -
The
PanelController.rebuild()is improved and also appliessafeAreaConfig's padding after rebuild. -
Fixed: When using modal panel, it would show an additional space on bottom on devices with notch (e.g., iPhone 11).
-
Fixed: When using modal panel, it would under-measure the panel height (even if there was enough space on screen available).
-
When panel's height reaches
0.0position, thePanelDecoration.boxShadowsare now hidden so that shadows are not visible even if the panel is closed. -
The panel is now wrapped in a
Materialwidget, so that thepanelContent's widgets don't have to.
1.1.2 April 14, 2020 #
- Fixed a bug that caused the
safeAreaConfigto not work properly when givingmarginto thePanelDecoration.
1.1.1 April 14, 2020 #
-
Breaking change: The parameter
useSafeAreais now removed. -
New: Parameter
safeAreaConfignow lets you choose the directions in which to apply the padding to avoid notch, status bar and nav-bar as well. -
New:
gradient,backgroundBlendModeandimagecan now be provided toPanelDecoration.
1.0.5 April 13, 2020 #
-
Fixes: #14
-
Change: In this release, the way the
useSafeAreaparameter works, is changed. Instead of wrapping whole panel inSafeArea, only top, left and right padding will be applied as necessary.- That means from now,
PanelContent.bodyContent,BackdropConfig's shadow will be un-affected byuseSafeAreaparameter and will get full screen available.
- That means from now,
1.0.4 April 11, 2020 #
-
Fix:
BackPressBehavior.CLOSE_PERSISTwas closing the parent route. Now it works as expected. -
Breaking change:
BackPressBehavior.CLOSE_PERSISTis now also valid for two-state panels. -
Breaking change:
BackPressBehavior.COLLAPSE_CLOSE_PERSISTis now considered asBackPressBehavior.CLOSE_PERSISTfor two-state panels.
1.0.3 March 30, 2020 #
-
New:
useSafeAreaparameter, that allows you to wrap the panel inside theSafeAreaparameter, in order to avoid notch and status bar of device! -
Fix: Opening/closing a modal panel several times caused the app to freeze, making it unable to interact with either the panel or the content. #12
-
Fix: An example caused height overflow.
-
Fix: The panel did not remember previous position when device was rotated. Now, it remembers and animates correctly. Also, doesn't send duplicate events to listeners when such situation arises. Though this feature works for all types of panels, this is more effective when using
autoSizing. -
Deprecation: The parameter
allowedDraggingTillis now deprecated and should be avoided. It has some flaws that cause problems like panel not draggable, content not scrollable, etc. These issues won't be fixed and this feature may be removed in future releases. Apologies for that.
1.0.2 March 25, 2020 #
- Fixed an issue that prevented the
headerContentto take whole available Header width even if theleadingwas not specified. #9
1.0.1 January 24, 2020 #
sliding_panel's first 2020 update comes with a bunch of changes, fixes and enhancements!
For migration to this version, visit the Migration guide.
Dismissible panel: #
- Now, the panel can be dismissed. Means, it can work as 4-state panel, namely
expanded, collapsed, closed and dismissed. - As a part of this change,
PanelController.dismiss(),PanelState.dismissedandInitialPanelState.dismissedwere added. - This works for two-state panels also!
Modal panel: #
- Use
SlidingPanelexactly same asshowModalBottomSheet(), by callingshowModalSlidingPanel(). It pushes a new route, waits for aNavigator.of(context).pop()... And guess what, you can also send results back, same as you did inshowModalBottomSheet()!!!
PanelHeader changes and improvements: #
- PanelHeader is now rendered as a
SliverAppBar! It has its own advantages. - PanelHeader now also accepts a parameter:
options, an instance ofPanelHeaderOptions, specially meant to customize the header.
panelContent changes: #
- Breaking change:
PanelContent.panelContentnow only accepts aList<Widget>. To get access toScrollController, grab that byPanelController.scrollData.scrollController. - Breaking change: As part of above change, you DON'T have to attach the
ScrollControlleryourself to any Widget. It is now done automatically. panelContentis now cached, so that it doesn't require parent to provide the same content twice due toPanelAutoSizing.
- Breaking change:
snapPanelwas removed. Instead, a new enum calledPanelSnappingis introduced. (The parameter is now calledsnapping). - Breaking change: In
PanelDecoration, thebackgroundColordefaults to the app's canvas color (i.e.,Theme.of(context).canvasColor). - Breaking change: The
Durationis now calculated fromPanelState.dismissedtoPanelState.expandedinstead of fromPanelState.closedtoPanelState.expanded. - Breaking change: The
PanelController.popWithResult()willdismissthe panel, instead ofclose. To avoid this, setshouldCloseOnlytotrue. (This also applies to a newly introducedPanelController.popWithThrowResult()).
- Change: Now, the PanelController doesn't throw error when it is re-assigned to different SlidingPanel. It simply ignores old one and points to new one.
- Change:
PanelCollapsedWidgetis now shown below thePanelHeaderWidget. - Refactor: The code in
panel.dartis refactored a lot. Now, it should be easy to understand.
- Fix + improved:
PanelAutoSizingrelated bugs fixed (they were many), unnecessary calculations removed. - Fix: For calculating various heights, 'Screen height (and width)' was used. Now, available 'Constrained height' is used, for more accurate calculation.
- Fix: A bug fixed that caused
double.infinityordouble.NaNwhen duration was being calculated. - Fix: A bug fixed that caused
double.NaNwhen backdrop opacity was being calculated. - Fix: A bug fixed that caused
double.NaNwhen panel's expanded height was being calculated. - Fix:
Disposed with active tickerbug fixed. (Was caused when panel is animating and route is popped.) - Fix: The panel now remembers the position when device's resolution / orientation changes.
- Fix: A bug with
BackPressBehavior.COLLAPSE_CLOSE_POPfixed.
- New: A whole new
Sliverbased layout, where thePanelHeaderWidgetis aSliverAppBarand contents are insideSliverList. - New: Call
rebuild()on PanelController to recalculate the PanelSize again. - New: New way to notify changes to the parent, using
throwResult()andpopWithThrowResult()which give results toonThrowResultcallback. - New: A new parameter called
useMinExpandedavailable inPanelAutoSizing, so thatPanelSize.expandedHeightalso gets considered when calculating the height. - New: A new parameter called
panelClosedOptionsavailable. Don't forget to check it out and decide what happens when the panel is closed. - New: Now
PanelController.sizeDatagives two additional properties:constrainedHeightandconstrainedWidth. - New: New parameter:
animatedAppearing. If true, the panel animates toinitialState, initially. - New: New parameter:
dragMultiplier. Now decide the amount of the panel slides when user drags the panel.
0.7.0 November 08, 2019 #
This release introduces below new features. There is no breaking change.
- New: Now you can specify panel's maximum width under different device orientations using
PanelMaxWidthparameter. - New: A new class
PanelFooterWidgetis added, so that you can give your panel a consistent bottom widget! - New: A new class
PanelScrollDatais added, which is helpful to get current scrolling position of the panel.
0.5.0 October 06, 2019 #
This package release introduces some API changes (majorly breaking changes) and a new underlying mechanism. Below are some of the changes. For complete list of changes and migration to this version, visit the Migration guide.
- New: Now specify what happens when user presses back button, using
BackPressBehaviorandPanelPoppingBehavior. - New: Now you can specify the limit of user's dragging the panel, using
allowedDraggingTillparameter. - New: Now you can provide
Scrollableelement insidepanelContent, so that the panel can be dragged and scrolled at the same time. - New:
snappingTriggerPercentageadded, so that you have more control over panel snapping. - New: A new class
PanelSizeDatais added (accessed fromPanelController), which helps to get updatedPanelSizeparameters of this panel. - When using
PanelAutoSizing, you can not change values ofPanelSizeat runtime. PanelControlleralso contains some new and breaking changes.onPanelExpanded,onPanelCollapsedandonPanelClosedare all combined in single :onPanelStateChanged.- Breaking change: The
headerContentis now moved to a separateWidgetcalledPanelHeaderWidget. - Breaking change: For
panelContent, a newtypedefis introduced, calledPanelBodyBuilder. - Breaking change:
PanelSizeclass no longer accepts values in pixels. Only percentage values can be given from now. - New and Breaking change: The
PanelState:animatingworks in adifferent way and a new stateindefiniteadded.
0.2.0 September 13, 2019 #
Now, the package is updated with some improvements as below:
- The code is separated in multiple files for readability.
- Almost all the functions of PanelController return a
Future, so that you can do some action afterwards. - When a panel is visible, you can change the panel's height runtime and it will animate. (This feature is not stable).
- Now you can provide the height of the panel in percentage of the screen also.
- A persistent header widget can be provided.
- The panel's height can be automatically determined depending on content! (see
PanelAutoSizingclass for this).
0.1.0 September 07, 2019 #
The initial release of the sliding_panel package. This includes below functions to the developers:
- A highly customisable Sliding panel
- Though many options available, it is made as easy as possible to tweak look and feel of the panel
- A panel can work as Three-state panel or traditional Two-state panel
- An easy to use PanelController, which helps getting current panel state and modifying its current state
- PanelController allows to animate the panel to arbitrary position
- Various callbacks that help getting current state of the panel
- Parallax and Backdrop effects on the panel
- Provide InitialPanelState property to decide how the panel is displayed initially
- Also responds to user gestures
- Panel can return arbitrary values back to the parent