flutter_sliding_comment_sheet 1.1.0
flutter_sliding_comment_sheet: ^1.1.0 copied to clipboard
A comment sheet that slides up and shrinks the content above it, like TikTok, Instagram Reels and YouTube Shorts.
Changelog #
1.1.0 #
A second resting height, off by default. Nothing changes for a sheet that does
not ask for one — without expandedSheetHeight the widget behaves exactly as
1.0.0 did.
expandedSheetHeight, a taller detent the open sheet can be dragged up to, where it climbs over the content instead of stopping above it — Instagram Reels' full-screen comment sheet.double.infinityresolves to the screen below the status bar- The content stops resizing at the open height and is covered from there on, rather than being squeezed towards nothing
- Above the open height the sheet grows rather than sliding: the list's viewport gets taller and chrome pinned to its bottom stays on the screen edge
- A released flick settles from where its momentum would have carried the sheet,
so a gentle throw stops at the next resting height and a hard one passes it,
as Instagram's does.
expandThresholdgoverns the climb asdismissThresholdgoverns the way down. A drag driven by the sheet's own list still moves at most one detent, so scrolling can never fling the sheet shut - The comment list no longer raises the sheet: scrolling up scrolls the list,
matching Instagram.
expandOnScroll: SheetScrollExpand.atTopopts out, from the top of the list expandFull(),collapseToOpen(),isFullyExpandedandexpandedProgresson the controller.progresskeeps its meaning, saturating at the open height- Releases settle on a spring aimed at their target rather than
AnimationController.fling, which can only land on the ends of the range initiallyExpandedopens at the open height rather than the expanded one, which it would otherwise have reached whenever anexpandedSheetHeightwas set
1.0.0 #
First release.
SlidingCommentSheet, a comment sheet that resizes the content above it instead of covering itSlidingCommentSheetControllerto open and close it, and to follow its position as it moves- Scroll-linked dragging: attach the
ScrollControllerfromsheetBuilderto your list and pulling it down closes the sheet, while pushing up opens the sheet before the list scrolls — one continuous gesture - Drag to dismiss, with a distance threshold and a separate velocity threshold so a flick closes the sheet however far open it is
- Releases settle on a spring carrying the gesture's own momentum
- The sheet is laid out at its full height and clipped as it moves, so its contents translate rather than being squashed, and fixed chrome inside it does not overflow while the sheet is short
initiallyExpandedfor a page that opens straight onto the commentscontentBorderRadius, which rounds the content's corners as the sheet opens and leaves them square while it is closed- Back button closes the sheet before it leaves the page
- Haptic feedback when the sheet settles, and a
semanticLabelplus a dismiss action so screen readers can name and close it - Lifts above the on-screen keyboard
- No dependencies beyond Flutter
