anchored_sheets
library
Enums
-
LogLevel
-
Log levels for different types of messages
Extensions
-
AnchoredSheetContext
on BuildContext
-
Enhanced extension methods for BuildContext to provide
convenient anchored sheet operations with improved error handling
Functions
-
anchoredSheet<T>({required BuildContext context, required WidgetBuilder builder, Color? backgroundColor, Color? shadowColor, double? elevation, ShapeBorder? shape, Clip? clipBehavior, BoxConstraints? constraints, BorderRadius? borderRadius, Color overlayColor = Colors.black54, Duration animationDuration = const Duration(milliseconds: 300), bool isDismissible = true, bool isScrollControlled = false, bool enableDrag = false, bool? showDragHandle, Color? dragHandleColor, Size? dragHandleSize, GlobalKey<State<StatefulWidget>>? anchorKey, double? topOffset, bool useSafeArea = false, bool enableNested = false})
→ Future<T?>
-
Shows an anchored modal sheet that slides down from the top of the screen.
-
anchoredSheetInternal<T>({required BuildContext context, required WidgetBuilder builder, Color? backgroundColor, Color? shadowColor, double? elevation, ShapeBorder? shape, Clip? clipBehavior, BoxConstraints? constraints, BorderRadius? borderRadius, Color overlayColor = Colors.black54, Duration animationDuration = const Duration(milliseconds: 300), bool isDismissible = true, bool isScrollControlled = false, bool enableDrag = false, bool? showDragHandle, Color? dragHandleColor, Size? dragHandleSize, GlobalKey<State<StatefulWidget>>? anchorKey, double? topOffset, bool useSafeArea = false, bool enableNested = false})
→ Future<T?>
-
Internal implementation of anchoredSheet with nested logic
-
buildClickThroughArea(double topOffset)
→ Widget
-
Builds a click-through area above the modal
-
buildDismissibleOverlay({required double topOffset, required Animation<double> fadeAnimation, required VoidCallback onTap, Color overlayColor = Colors.black54})
→ Widget
-
Builds a dismissible overlay behind the modal
-
buildModalContent({required Widget child, required GlobalKey<State<StatefulWidget>> childKey, BottomSheetThemeData? theme, Color? backgroundColor, Color? shadowColor, double? elevation, ShapeBorder? shape, BorderRadius? borderRadius, Clip? clipBehavior, BoxConstraints? constraints, bool useSafeArea = false, bool showDragHandle = false, bool isScrollControlled = false, bool hasAnchorKey = false, VoidCallback? onDragHandleTap, ValueChanged<bool>? onDragHandleHover, Set<WidgetState>? dragHandleStates, Color? dragHandleColor, Size? dragHandleSize})
→ Widget
-
Builds a positioned modal content with Material theming
-
buildPositionedModal({required double topOffset, required double height, required Widget child, required Animation<double> slideAnimation, required Animation<double> fadeAnimation, void onDismiss(dynamic)?, Color? backgroundColor, ShapeBorder? shape, bool hasAnchorKey = false, bool isScrollControlled = false})
→ Widget
-
Builds the main positioned modal with animations and status bar handling
-
calculateModalHeight({required double availableHeight, bool isScrollControlled = false, bool hasAnchorKey = false})
→ double
-
Calculates modal height based on scroll control settings
-
calculateTopOffset({GlobalKey<State<StatefulWidget>>? anchorKey, double? topOffset, BuildContext? context, bool respectStatusBar = true})
→ double
-
Calculates the appropriate top offset for anchored modals
-
dismissAnchoredSheet<T extends Object?>([T? result])
→ Future<void>
-
Dismisses the currently active TopModalSheet without requiring a
BuildContext.