OverBottomSheetController class
Controller that manages the ratio of OverBottomSheet being displayed.
The ratio value ranges from 0.0 (closed) to 1.0 (fully open). Use animateTo, open, and close to animate the sheet position.
Example:
final controller = OverBottomSheetController();
// Listen to value changes
controller.addListener(() => print(controller.value));
// Animate to specific position
controller.animateTo(0.5);
// Open/close shortcuts
controller.open();
controller.close();
- Inheritance
-
- Object
- ChangeNotifier
- ValueNotifier<
double> - OverBottomSheetController
Constructors
- OverBottomSheetController({double ratio = 1.0})
-
Creates a controller with the given initial
ratio.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value ↔ double
-
The current value stored in this notifier.
getter/setter pairinherited
Methods
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
animateTo(
double ratio, {Duration? duration, Curve? curve}) → Future< void> -
Animates to a specific
ratio. -
close(
{Duration? duration, Curve? curve}) → Future< void> - Closes the sheet to the minimum size (ratio 0.0).
-
dispose(
) → void -
Discards any resources used by the object.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
open(
{Duration? duration, Curve? curve}) → Future< void> - Opens the sheet to the maximum size (ratio 1.0).
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
setAnimationHandler(
AnimationHandler? handler) → void - Sets the animation handler callback.
-
toString(
) → String -
A string representation of this object.
inherited
-
updateRatio(
double ratio) → void - Updates the ratio value immediately (no animation).
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited