bubbles_sheet library

Pill-shouldered, iOS-26-style modal bottom sheets, built on package:smooth_sheets.

The entry point is showBubblesSheet; BubblesSheetThemeData holds every colour, measurement, icon and haptic the chrome uses, and is registered as a ThemeExtension so sheets pick it up with no wiring at the call site.

smooth_sheets is re-exported: paged flows built with PagedSheet need its SheetController, ModalSheetRoute and friends, and re-exporting keeps those on one import rather than two.

Classes

AbsoluteSheetOffset
A SheetOffset that represents a position with a fixed value in offset.
AlwaysVisibleBottomBarVisibility
The bottom bar is always visible regardless of the sheet's offset.
BottomBarVisibility
Defines how the SheetContentScaffold.bottomBar of SheetContentScaffold should be displayed in response to the bottom inset caused by system UI.
BouncingSheetPhysics
A SheetPhysics that allows the sheet to go beyond the offset bounds defined by SheetMetrics.minOffset and SheetMetrics.maxOffset.
BoxSheetDecoration
SheetDecoration that uses a DecoratedBox widget to decorate the sheet.
BubblesDeviceCornerRadius
The display's bottom screen-corner radius, in logical pixels.
BubblesPagedSheetCircleButton
BubblesPagedSheetDragHandle
BubblesPagedSheetHeader
Top chrome for a page inside a PagedSheet. Drag handle + circular leading button + centered title.
BubblesPagedSheetSurface
Sheet decoration for paged sheets. Top corners hold the theme's top radius; bottom corners lerp from deviceCornerRadius - inset (floating) up to deviceCornerRadius (flush) as the sheet approaches the large detent — and snap to 0 once fully flush, since the device's own screen corner curve takes over the clipping at that point.
BubblesPagedSheetViewport
Viewport chrome for a paged modal sheet: floats the sheet on its inset, lerps to flush as it nears the large detent, and lifts the whole sheet above the software keyboard. Drop into ModalSheetRoute.viewportBuilder.
BubblesSheetAction
A text action in the header's trailing slot — the counterpart to the leading close button.
BubblesSheetCta
The sticky primary action pinned to the bottom of a sheet.
BubblesSheetDetent
iOS-26-style modal sheet detent.
BubblesSheetHaptics
Hooks fired at the moments a sheet wants to feel physical.
BubblesSheetMetrics
The sheet's geometry — insets, radii, and the padding around each chrome slot.
BubblesSheetPalette
The chrome colours for one brightness.
BubblesSheetThemeData
Everything a showBubblesSheet sheet needs that isn't the sheet itself: colours, geometry, type, icons, haptics, and how the primary CTA renders.
ClampingSheetPhysics
ConditionalBottomBarVisibility
The visibility of the bottom bar is controlled by the isVisible callback.
ControlledBottomBarVisibility
The visibility of the bottom bar is controlled by the animation.
CupertinoModalSheetPage<T>
CupertinoModalSheetRoute<T>
DefaultSheetController
DragDownSheetKeyboardDismissBehavior
A SheetKeyboardDismissBehavior that dismisses the on-screen keyboard only when the sheet is dragged down.
DragSheetKeyboardDismissBehavior
A SheetKeyboardDismissBehavior that always dismisses the on-screen keyboard when the sheet is dragged.
DragUpSheetKeyboardDismissBehavior
A SheetKeyboardDismissBehavior that dismisses the on-screen keyboard only when the sheet is dragged up.
MaterialSheetDecoration
SheetDecoration that uses a Material widget to decorate the sheet.
ModalSheetPage<T>
ModalSheetRoute<T>
MultiSnapGrid
NaturalBottomBarVisibility
The bottom bar is displayed naturally, based on the sheet's offset.
PagedSheet
PagedSheetPage<T>
A Page for PagedSheet.
PagedSheetRoute<T>
A Route for PagedSheet.
PagedSheetRouteTheme
An InheritedWidget that provides default route parameter values for PagedSheetRoutes and PagedSheetPages in a PagedSheet.
PagedSheetRouteThemeData
Holds default values for inheritable PagedSheetRoute and PagedSheetPage parameters in a PagedSheet.
ProportionalToViewportSheetOffset
A SheetOffset that is defined by a factor of the viewport size.
RelativeSheetOffset
A SheetOffset that represents a position proportional to the content height of the sheet.
Sheet
SheetContentScaffold
The basic layout of the content in a Sheet.
SheetController
SheetDecoration
SheetDecorationBuilder
SheetDragCancelDetails
Details for when a sheet drag is canceled.
SheetDragCancelNotification
A SheetNotification that is dispatched when the user or the system cancels a drag gesture in the sheet.
SheetDragConfiguration
Defines how a sheet should respond to drag gestures.
SheetDragDetails
Represents the details of a drag event on a sheet.
SheetDragEndDetails
Details for when a sheet drag ends.
SheetDragEndNotification
A SheetNotification that is dispatched when the user stops dragging the sheet.
SheetDragStartDetails
Details for the start of a sheet drag.
SheetDragStartNotification
A SheetNotification that is dispatched when the user starts dragging the sheet.
SheetDragUpdateDetails
Details about the update of a sheet drag gesture.
SheetDragUpdateNotification
A SheetNotification that is dispatched when the sheet is dragged.
SheetKeyboardDismissBehavior
Determines when the on-screen keyboard should be dismissed.
SheetKeyboardDismissible
A widget that dismisses the on-screen keyboard when the user drags the sheet below this widget.
SheetLayout
SheetLayoutSpec
Geometry of the viewport and the layout constraints used to lay out the sheet and its content.
SheetMediaQuery
Stores the geometry of the viewport and the layout constraints used to lay out the sheet and its content.
SheetNotification
A Notification that is dispatched when the sheet position changes.
SheetOffset
An abstract representation of a sheet's position.
SheetOffsetDrivenAnimation
SheetOverflowNotification
A SheetNotification that is dispatched when the user tries to drag the sheet beyond its draggable bounds but the sheet has not changed its position because its SheetPhysics does not allow it to be.
SheetPhysics
SheetPopScope<T>
Manages the back navigation gesture for the current modal sheet.
SheetScrollable
Wires an ancestor sheet and its scrollable content below this widget.
SheetScrollConfiguration
Defines how the sheet integrates with scrollable content.
SheetScrollController
The ScrollController for scrollable content in a sheet.
SheetSnapGrid
SheetUpdateNotification
A SheetNotification that is dispatched when the sheet position is updated by other than user interaction such as animation.
SheetViewport
SingleSnapGrid
SizedSheetDecoration
SteplessSnapGrid
SwipeDismissSensitivity
Configuration for the swipe-to-dismiss sensitivity of ModalSheetRoute, ModalSheetPage, and related classes.
ViewportLayout

Enums

SheetScrollHandlingBehavior
Defines how the sheet position is synced with scroll gestures performed on a scrollable content.
SheetSize

Mixins

ModalSheetRouteMixin<T>
SheetMetrics
The metrics of a sheet.
SheetPhysicsMixin
A mixin that provides default implementations for SheetPhysics methods.

Constants

kDefaultSheetPhysics → const BouncingSheetPhysics
The default SheetPhysics used by sheet widgets.

Functions

buildDefaultCta(BuildContext context, BubblesSheetCta cta) Widget
The package's stock primary CTA: a full-width pill drawn from the ambient ColorScheme, so it inherits an app's brand colour without any wiring.
showAdaptiveModalSheet<T>({required BuildContext context, required WidgetBuilder builder, bool useRootNavigator = true, bool barrierDismissible = true, bool swipeDismissible = false, String? barrierLabel, Color? barrierColor, Duration? transitionDuration, Curve? transitionCurve, SwipeDismissSensitivity swipeDismissSensitivity = const SwipeDismissSensitivity(), RouteSettings? routeSettings}) Future<T?>
Pushes a platform-appropriate modal sheet onto the navigator's stack.
showBubblesSheet<T extends Object?>(BuildContext context, {required WidgetBuilder builder, List<BubblesSheetDetent> detents = const [BubblesSheetDetent.fit, BubblesSheetDetent.large], BubblesSheetDetent? initialDetent, String? title, BubblesSheetAction? trailingAction, bool showCloseButton = true, bool showDragHandle = true, bool barrierDismissible = true, bool swipeDismissible = true, bool dismissKeyboardOnDrag = false, Color barrierColor = const Color(0x52000000), BubblesSheetCta? primaryCta, BubblesSheetCtaBuilder? primaryCtaBuilder, Listenable? primaryCtaListenable, Widget? footer, bool useRootNavigator = true, bool dark = false}) Future<T?>
Push a modal sheet with the Bubbles chrome.
showCupertinoModalSheet<T>({required BuildContext context, required WidgetBuilder builder, bool useRootNavigator = true, bool maintainState = true, bool barrierDismissible = true, bool swipeDismissible = false, String? barrierLabel, Color? barrierColor, Duration? transitionDuration, Curve? transitionCurve, SwipeDismissSensitivity swipeDismissSensitivity = const SwipeDismissSensitivity(), RouteSettings? routeSettings}) Future<T?>
Pushes a CupertinoModalSheetRoute onto the navigator's stack.
showModalSheet<T>({required BuildContext context, required WidgetBuilder builder, bool useRootNavigator = true, bool maintainState = true, bool barrierDismissible = true, bool swipeDismissible = false, bool fullscreenDialog = false, String? barrierLabel, Color? barrierColor, Duration? transitionDuration, Curve? transitionCurve, SwipeDismissSensitivity swipeDismissSensitivity = const SwipeDismissSensitivity(), EdgeInsets viewportPadding = EdgeInsets.zero, RouteSettings? routeSettings}) Future<T?>
Pushes a ModalSheetRoute onto the navigator's stack.

Typedefs

BubblesSheetCtaBuilder = BubblesSheetCta? Function(BuildContext context)
Builds the sticky primary action for a sheet, letting a host app render its own button rather than the package's default pill.
BubblesSheetCtaWidgetBuilder = Widget Function(BuildContext context, BubblesSheetCta cta)
Renders a BubblesSheetCta as a widget. Set on BubblesSheetThemeData.ctaBuilder.
CupertinoSheetViewportBuilder = Widget Function(BuildContext context, double preferredTopInset, Widget child)
Signature of callbacks that build an SheetViewport for the child sheet widget.
ModalSheetBarrierBuilder<T> = Widget Function(ModalRoute<T> route, VoidCallback onDismissCallback)
A builder for creating a custom modal barrier.
SheetLayoutListenable = ValueListenable<SheetLayout?>
SheetViewportBuilder = Widget Function(BuildContext context, Widget child)