flutter_sliding_comment_sheet 1.1.0 copy "flutter_sliding_comment_sheet: ^1.1.0" to clipboard
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.infinity resolves 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. expandThreshold governs the climb as dismissThreshold governs 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.atTop opts out, from the top of the list
  • expandFull(), collapseToOpen(), isFullyExpanded and expandedProgress on the controller. progress keeps 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
  • initiallyExpanded opens at the open height rather than the expanded one, which it would otherwise have reached whenever an expandedSheetHeight was set

1.0.0 #

First release.

  • SlidingCommentSheet, a comment sheet that resizes the content above it instead of covering it
  • SlidingCommentSheetController to open and close it, and to follow its position as it moves
  • Scroll-linked dragging: attach the ScrollController from sheetBuilder to 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
  • initiallyExpanded for a page that opens straight onto the comments
  • contentBorderRadius, 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 semanticLabel plus a dismiss action so screen readers can name and close it
  • Lifts above the on-screen keyboard
  • No dependencies beyond Flutter
10
likes
160
points
106
downloads
screenshot

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A comment sheet that slides up and shrinks the content above it, like TikTok, Instagram Reels and YouTube Shorts.

Repository (GitHub)
View/report issues

Topics

#comment-sheet #tiktok #instagram #reels #social-media

License

BSD-3-Clause (license)

Dependencies

flutter

More

Packages that depend on flutter_sliding_comment_sheet