DragContainer class

lib/code15/drag/drag_container.dart 抽屉内容Widget

Inheritance

Constructors

DragContainer({Key? key, required Widget dragWidget, double initChildRate = 0.1, double maxChildRate = 0.4, double cornerRadius = 12, Color backGroundColor = Colors.white, bool isShowHeader = true, bool useAtEdge = true, Duration duration = const Duration(milliseconds: 250), double maxOffsetDistance = 1.5, ScrollController? scrollController, DragController? controller, dynamic dragCallBack(bool isOpen)?})

Properties

backGroundColor Color
背景颜色
final
controller DragController?
抽屉控制器
final
cornerRadius double
背景圆角
final
dragCallBack → dynamic Function(bool isOpen)?
抽屉滑动状态回调
final
dragWidget Widget
抽屉主体内容
final
duration Duration
滑动结束时 自动滑动到底部或者顶部的时间
final
hashCode int
The hash code for this object.
no setterinherited
initChildRate double
默认显示的高度与屏幕的比率
final
isShowHeader bool
是否显示标题
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
maxChildRate double
可显示的最大高度 与屏幕的比率
final
maxOffsetDistance double
滑动位置超过这个位置,会滚到顶部; 小于,会滚动底部。 向上或者向下滑动的临界值
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scrollController ScrollController?
抽屉中滑动视图的控制器 0.0.2 版本已弃用 改为NotificationListener
final
useAtEdge bool
配置为true时 当抽屉为打开时,列表滑动到了顶部,再向下滑动时,抽屉会关闭 当抽屉为关闭时,列表向上滑动,抽屉会自动打开
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → _DragContainerState
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