DecoratorBox<T> class

Widget 装饰器

Inheritance
Available extensions

Constructors

DecoratorBox({Key? key, required Widget child, List<DecoratorPendant<T>> headers = const [], List<DecoratorPendant<T>> footers = const [], List<DecoratorPendant<T>> suffixes = const [], List<DecoratorPendant<T>> prefixes = const [], bool expanded = true, DecoratorBoxDecorativeBuilder<T>? decoration, Listenable? listenable, DecoratorBoxStatusCallback? onFocus, DecoratorBoxStatusCallback? onEditing, DecoratorBoxStatusValueCallback<T>? onValue, DecoratorBoxSpacing spacing = const DecoratorBoxSpacing(), DecoratorBoxHeadersFootersDirection direction = const DecoratorBoxHeadersFootersDirection()})
const

Properties

child Widget
final
decoration DecoratorBoxDecorativeBuilder<T>?
DecoratorBox 样式
final
direction DecoratorBoxHeadersFootersDirection
headers, footers 方向
final
expanded bool
是否 Expanded
final
footers List<DecoratorPendant<T>>
child 尾部
final
hashCode int
The hash code for this object.
no setterinherited
headers List<DecoratorPendant<T>>
child 头部
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
listenable Listenable?
添加 Listenable 监听 当 listenable 发生变化时,会重新构建 DecoratorBox 注意:listenable 必须是 ListenableListenable 的子类
final
onEditing DecoratorBoxStatusCallback?
是否在编辑中
final
onFocus DecoratorBoxStatusCallback?
是否有焦点监听
final
onValue DecoratorBoxStatusValueCallback<T>?
value 回调
final
prefixes List<DecoratorPendant<T>>
child 后缀
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
spacing DecoratorBoxSpacing
间距
final
suffixes List<DecoratorPendant<T>>
child 前缀
final
toExpansionTilesRotationIconBuilder ExpansionTilesRotationIconBuilder

Available on Widget, provided by the ExtensionExpansionTiles extension

no setter
toToggleRotateIconBuilder ToggleRotateIconBuilder

Available on Widget, provided by the ExtensionWidgetToggleRotate extension

no setter

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
buildDecoratorBox(DecoratorBoxStatus<T> status) Widget
outer
buildInner(DecoratorBoxStatus<T> status) Widget
inner
buildPendant(List<DecoratorPendant<T>> list, DecoratorPendantPosition positioned, DecoratorBoxStatus<T> status, {Axis direction = Axis.horizontal}) Widget?
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
toDecoratorPendant<T>({DecoratorPendantPosition positioned = DecoratorPendantPosition.outer, bool maintainSize = false, bool? needFocus, bool? needEditing, DecoratorPendantValueCallback<T?>? needValue}) DecoratorPendant<T>

Available on Widget, provided by the ExtensionWidgetDecoratorBox extension

toDecoratorPendantBuilder<T>({DecoratorPendantPosition positioned = DecoratorPendantPosition.outer, bool maintainSize = false, bool? needFocus, bool? needEditing, DecoratorPendantValueCallback<T?>? needValue}) DecoratorPendant<T>

Available on Widget, provided by the ExtensionWidgetDecoratorBox extension

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