BaseDrawer class
自定义drawer 不可指定起点位置跟终点位置 default is 304 width or height
- Inheritance
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- BaseDrawer
Constructors
- BaseDrawer({Key key, Duration duration = _drawerTransitionDuration, AxisDirection axisDirection = AxisDirection.right, Size size, double percent, Color backgroundColor = _drawerBackgroundColor, @required Widget child, Curve curve = Curves.linearToEaseOut, Curve reverseCurve = Curves.linearToEaseOut, bool allowGesture = true, bool allowMultipleGesture = false, bool barrierDismissible = true})
-
const
- BaseDrawer.height({Key key, Duration duration = _drawerTransitionDuration, AxisDirection axisDirection = AxisDirection.up, Color backgroundColor = _drawerBackgroundColor, @required double height, @required Widget child, Curve curve = Curves.linearToEaseOut, Curve reverseCurve = Curves.linearToEaseOut, bool allowGesture = true, bool allowMultipleGesture = false, bool barrierDismissible = true})
- 指定高度 axisDirection 只能为 AxisDirection.up or AxisDirection.down
- BaseDrawer.percent({Key key, Duration duration = _drawerTransitionDuration, AxisDirection axisDirection = AxisDirection.right, Color backgroundColor = _drawerBackgroundColor, @required double percent, @required Widget child, Curve curve = Curves.linearToEaseOut, Curve reverseCurve = Curves.linearToEaseOut, bool allowGesture = true, bool allowMultipleGesture = false, bool barrierDismissible = true})
-
指定百分比
const
- BaseDrawer.size({Key key, Duration duration = _drawerTransitionDuration, AxisDirection axisDirection = AxisDirection.right, Color backgroundColor = _drawerBackgroundColor, @required Size size, @required Widget child, Curve curve = Curves.linearToEaseOut, Curve reverseCurve = Curves.linearToEaseOut, bool allowGesture = true, bool allowMultipleGesture = false, bool barrierDismissible = true})
-
const
- BaseDrawer.width({Key key, Duration duration = _drawerTransitionDuration, AxisDirection axisDirection = AxisDirection.right, Color backgroundColor = _drawerBackgroundColor, @required double width, @required Widget child, Curve curve = Curves.linearToEaseOut, Curve reverseCurve = Curves.linearToEaseOut, bool allowGesture = true, bool allowMultipleGesture = false, bool barrierDismissible = true})
- 指定宽度 axisDirection 只能为 AxisDirection.left or AxisDirection.right
Properties
- allowGesture → bool
-
final
- allowMultipleGesture → bool
-
final
- axisDirection → AxisDirection
-
axisDirection
final
- backgroundColor → Color
-
backgroundColor
final
- barrierDismissible → bool
-
final
- child → Widget
-
child
final
- curve → Curve
-
final
- duration → Duration
-
transitionDuration, default is
_drawerTransitionDuration
final - hashCode → int
-
The hash code for this object. [...]
@nonVirtual, read-only, inherited
- key → Key
-
Controls how one widget replaces another widget in the tree. [...]
final, inherited
- percent → double
-
(width or height)'s percent
Cannot provide both a size and a percent
size == null && percent == null, the size = _defaultDrawerSize
axisDirection = up / down, width = 100%, height = percent
axisDirection = left / right, width = percent, height = 100%
final
- reverseCurve → Curve
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
- size → Size
-
size
final
Methods
-
close(
GlobalObjectKey< BaseDrawerState> drawerKey) → void -
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree. [...]
inherited
-
createState(
) → State< StatefulWidget> -
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. [...]
@protected, inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node. [...]
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
-
open<
T> (BuildContext context, ) → Future< T> -
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}) → 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. [...]
@nonVirtual, inherited