over_bottom_sheet library

A Flutter widget that provides an always-visible, draggable bottom sheet.

Features

  • Always visible bottom sheet with customizable size
  • Multiple snap points for positioning
  • Nested scroll support for scrollable content
  • Programmatic control via controller
  • Material 3 theming support

Usage

import 'package:over_bottom_sheet/over_bottom_sheet.dart';

final controller = OverBottomSheetController();

OverBottomSheet(
  controller: controller,
  snapPoints: const [0.0, 0.5, 1.0],
  maxHeight: 0.8,  // 80% of parent (ratio ≤1.0)
  minHeight: 100,  // 100px (fixed >1.0)
  content: ListView.builder(...),
  child: const Center(child: Text('Background')),
)

Classes

OverBottomSheet
A widget that displays an always-visible, draggable bottom sheet.
OverBottomSheetController
Controller that manages the ratio of OverBottomSheet being displayed.

Functions

calculateTargetSnap({required double currentValue, required double velocity, required double velocityThreshold, required List<double> sortedSnaps}) double
Calculates the target snap point based on current value and velocity.

Typedefs

AnimationHandler = Future<void> Function(double ratio, {Curve? curve, Duration? duration})
Type definition for animation handler callback.
RatioWidgetBuilder = Widget Function(BuildContext context, double ratio)
Function to create a widget using the display ratio of OverBottomSheet.