NZDrawer class

NZDrawer 一个高度可定制的抽屉组件,可以放置在屏幕的任何一侧。

Inheritance

Constructors

NZDrawer({Key? key, required Widget child, NZDrawerPosition position = NZDrawerPosition.left, double? size, Color? backgroundColor, double elevation = 16.0, bool showDragHandle = true, double borderRadius = 16.0})
const

Properties

backgroundColor Color?
背景颜色
final
borderRadius double
圆角半径
final
child Widget
抽屉内容
final
elevation double
抽屉阴影
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
position NZDrawerPosition
抽屉位置
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showDragHandle bool
是否显示拖动手柄 (仅适用于顶部/底部)
final
size double?
尺寸 (左/右为宽度,上/下为高度)
final

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
createElement() StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
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

Static Methods

show<T>({required BuildContext context, required Widget child, NZDrawerPosition position = NZDrawerPosition.left, double? size, Color? backgroundColor, double elevation = 16.0, bool showDragHandle = true, double borderRadius = 16.0}) Future<T?>
以模态框形式显示抽屉的静态方法