DecoratedFlex class

Inheritance
Implementers
Available Extensions

Constructors

DecoratedFlex({Key? key, EdgeInsets? padding, EdgeInsets? margin, Color? color, Decoration? decoration, Decoration? foregroundDecoration, BoxConstraints? constraints, Matrix4? transform, Offset? offset, double? width, double? height, required Axis direction, AlignmentGeometry? alignment, MainAxisAlignment mainAxisAlignment = MainAxisAlignment.start, MainAxisSize mainAxisSize = MainAxisSize.max, CrossAxisAlignment crossAxisAlignment = CrossAxisAlignment.center, TextBaseline? textBaseline, ContextCallback? onPressed, ContextCallback? onLongPressed, ContextCallback? onDoubleTap, ContextCallback? onSecondaryTap, GestureTapDownCallback? onSecondaryTapDown, GestureDragStartCallback? onVerticalDragStart, GestureDragEndCallback? onVerticalDragEnd, GestureDragEndCallback? onHorizontalDragEnd, HitTestBehavior? behavior, double? itemSpacing = 0, Widget? divider, bool? visible, bool? expanded, bool? flexible, bool? withForm, int? flex, @Deprecated('可以使用childrenFlex: FlexConfig.expanded()代替') bool? forceItemSameExtent = false, double? elevation, SafeAreaConfig? safeArea, bool? scrollable, bool? primary, ScrollController? scrollController, ScrollPhysics? scrollPhysics, double? widthFactor, double? heightFactor, bool material = false, TextStyle? textStyle, TextAlign? textAlign, bool? softWrap, int? maxLines, TextOverflow? overflow, GlobalKey<State<StatefulWidget>>? repaintBoundaryKey, Duration? animationDuration, Curve? animationCurve, ThemeData? theme, Widget? topRight, bool? center, bool? sliver = false, VerticalDirection? verticalDirection, Clip clipBehavior = Clip.none, Color? iconColor, SystemUiOverlayStyle? systemOverlayStyle, bool? ignorePointer, bool? absorbPointer, bool? enableFeedback, bool? autofillGroup, double? aspectRatio, bool? reverse, FlexConfig? childrenFlex, List<Widget> children = const []})
const

Properties

absorbPointer bool?
是否吸收指针事件(本身响应事件, 但是阻止子Widget响应事件)
final
alignment AlignmentGeometry?
final
animationCurve Curve?
动画曲线
final
animationDuration Duration?
动画时长
final
aspectRatio double?
宽高比
final
autofillGroup bool?
自动填充组
final
behavior HitTestBehavior?
final
center bool?
是否加center
final
children List<Widget>
子元素
final
childrenFlex FlexConfig?
子元素的flex
final
clipBehavior Clip
final
color Color?
final
constraints BoxConstraints?
final
crossAxisAlignment CrossAxisAlignment
final
decoration Decoration?
final
direction Axis
final
divider Widget?
分隔控件 与itemSpacing功能类似, 但是优先使用divider
final
elevation double?
final
enableFeedback bool?
final
expanded bool?
是否展开
final
flex int?
比例
final
flexible bool?
是否展开
final
forceItemSameExtent bool?
是否强制子控件等长
final
foregroundDecoration Decoration?
final
hashCode int
The hash code for this object.
no setterinherited
height double?
final
heightFactor double?
final
iconColor Color?
final
ignorePointer bool?
是否忽略指针事件(本身和子Widget都不响应事件)
final
itemSpacing double?
元素间距
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
mainAxisAlignment MainAxisAlignment
final
mainAxisSize MainAxisSize
final
margin EdgeInsets?
final
material bool
final
maxLines int?
final
offset Offset?
作用在Transform.translate上的偏移量
final
onDoubleTap ContextCallback?
final
onHorizontalDragEnd GestureDragEndCallback?
final
onLongPressed ContextCallback?
final
onPressed ContextCallback?
final
onSecondaryTap ContextCallback?
final
onSecondaryTapDown GestureTapDownCallback?
final
onVerticalDragEnd GestureDragEndCallback?
final
onVerticalDragStart GestureDragStartCallback?
final
overflow TextOverflow?
final
padding EdgeInsets?
final
primary bool?
final
repaintBoundaryKey GlobalKey<State<StatefulWidget>>?
是否需要RepaintBoundary
final
reverse bool?
是否反向排列
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
safeArea SafeAreaConfig?
是否安全区域
final
scrollable bool?
滚动相关
final
scrollController ScrollController?
final
scrollPhysics ScrollPhysics?
final
sliver bool?
是否sliver
final
softWrap bool?
final
systemOverlayStyle SystemUiOverlayStyle?
final
textAlign TextAlign?
final
textBaseline TextBaseline?
final
textStyle TextStyle?
内部统一的TextStyle
final
theme ThemeData?
主题
final
topRight Widget?
右上角控件
final
transform Matrix4?
final
verticalDirection VerticalDirection?
垂直方向
final
visible bool?
是否可见
final
width double?
final
widthFactor double?
final
withForm bool?
是否带有表单
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}) 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