PopupView class Null safety

弹窗view

Inheritance

Constructors

PopupView({Key? key, required GlobalKey<State<StatefulWidget>> originKey, required List<PopModel> itemsData, Color? bgColor, Color? itemTitleColor, Color? itemIconColor, String? selText = '', double? itemHeight, double? itemWidth, dynamic clickCallback(int, PopModel)?, Color? dividerColor, Color? itemSelectedColor, double? triangleHeight, double? triangleWidth, bool? noTriangle, double? maxHeight})
const

Properties

bgColor Color?
弹窗背景色
final
clickCallback → (dynamic Function?(int, PopModel)?)
item点击选中时回调
final
dividerColor Color?
item间隔线颜色
final
hashCode int
The hash code for this object. [...]
@nonVirtual, read-only, inherited
itemHeight double?
item高度 默认50
final
itemIconColor Color?
item图标颜色
final
itemsData List<PopModel>
item数据源
final
itemSelectedColor Color?
item选中时字体颜色
final
itemTitleColor Color?
item字体颜色
final
itemWidth double?
item宽度 默认120
final
key Key?
Controls how one widget replaces another widget in the tree. [...]
final, inherited
maxHeight double?
列表弹窗最大高度,若设置最大高度则可滑动 否则高度自适应
final
noTriangle bool?
不展示小三角
final
originKey GlobalKey<State<StatefulWidget>>
弹窗view位置上方所在widget的标识
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
selText String?
默认选中的item标题
final
triangleHeight double?
小三角高度默认10
final
triangleWidth double?
小三角宽度默认14
final

Methods

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