SlideRevealScreen class

A widget that provides a slideable screen with two hidden pages.

This widget allows you to reveal a left or right hidden page by dragging from the edge of the screen.

The widget takes in the hidden pages, a main content widget, optional placeholder widgets, and various configuration parameters.

Inheritance

Constructors

SlideRevealScreen.new({Key? key, required Widget leftHiddenPage, required Widget rightHiddenPage, required Widget child, SlideRevealController? controller, bool isLeftActive = true, bool isRightActive = true, Widget leftPlaceHolderWidget = const SizedBox.shrink(), Widget rightPlaceHolderWidget = const SizedBox.shrink(), double leftWidgetVisibilityThreshold = 0.1, double rightWidgetVisibilityThreshold = 0.1, num flingVelocity = 500, bool showDebugColors = false, double leftEdgeWidthBuilder(BuildContext context, bool isActive)?, double leftEdgeTopPaddingBuilder(BuildContext context, bool isActive)?, double leftEdgeBottomPaddingBuilder(BuildContext context, bool isActive)?, double rightEdgeWidthBuilder(BuildContext context, bool isActive)?, double rightEdgeTopPaddingBuilder(BuildContext context, bool isActive)?, double rightEdgeBottomPaddingBuilder(BuildContext context, bool isActive)?, ValueChanged<SlideRevealProgress>? onProgressChanged, Widget leftHiddenPageBuilder()?, Widget rightHiddenPageBuilder()?})
const

Properties

child Widget
The main content of the screen.
final
controller SlideRevealController?
An optional controller to manage the slide reveal widget.
final
flingVelocity num
The velocity at which the user flings the screen to reveal the hidden page.
final
hashCode int
The hash code for this object.
no setterinherited
isLeftActive bool
Whether the left hidden page is active (i.e., enabled).
final
isRightActive bool
Whether the right hidden page is active.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
leftEdgeBottomPaddingBuilder double Function(BuildContext context, bool isActive)?
A builder function that returns the bottom padding of the left edge.
final
leftEdgeTopPaddingBuilder double Function(BuildContext context, bool isActive)?
A builder function that returns the top padding of the left edge.
final
leftEdgeWidthBuilder double Function(BuildContext context, bool isActive)?
A builder function that returns the width of the left edge.
final
leftHiddenPage Widget
The widget displayed as the left hidden page.
final
leftHiddenPageBuilder Widget Function()?
A widget builder for the left hidden page. This allows for dynamic creation of the widget only when needed. If not provided, the leftHiddenPage will be used directly.
final
leftPlaceHolderWidget Widget
A placeholder widget to display for the left side if the hidden page isn't fully visible.
final
leftWidgetVisibilityThreshold double
The threshold (a value between 0 and 1) for revealing the left hidden page.
final
onProgressChanged ValueChanged<SlideRevealProgress>?
Callback that gets invoked whenever the slide reveal progress changes.
final
rightEdgeBottomPaddingBuilder double Function(BuildContext context, bool isActive)?
A builder function that returns the bottom padding of the right edge.
final
rightEdgeTopPaddingBuilder double Function(BuildContext context, bool isActive)?
A builder function that returns the top padding of the right edge.
final
rightEdgeWidthBuilder double Function(BuildContext context, bool isActive)?
A builder function that returns the width of the right edge.
final
rightHiddenPage Widget
The widget displayed as the right hidden page.
final
rightHiddenPageBuilder Widget Function()?
A widget builder for the right hidden page. This allows for dynamic creation of the widget only when needed. If not provided, the rightHiddenPage will be used directly.
final
rightPlaceHolderWidget Widget
A placeholder widget for the right side when its hidden page isn't fully visible.
final
rightWidgetVisibilityThreshold double
The threshold for revealing the right hidden page.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showDebugColors bool
This will color the region that can be dragged to reveal the hidden pages.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() SlideRevealScreenState
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited