AntdBox class
@t 布局盒子 @g 通用 @o 100 @d 类似于Web中的div,小程序中的view,Android中的View,iOS中的UIView
- Inheritance
Constructors
-
AntdBox.new({Key? key, AntdBoxStyle? style, AntdStyleBuilder<
AntdBoxStyle, AntdBox> ? styleBuilder, AntdPosition? outerSafeArea, AntdPosition? innerSafeArea, AntdOnLayout? onLayout, AntdOnFocus? onFocus, VoidCallback? onTap, VoidCallback? onDoubleTap, VoidCallback? onLongPress, bool? disabled, AntdTapOptions? options, Widget? child, FocusNode? focusNode, ScrollController? scrollController}) -
const
Properties
- child → Widget?
-
子组件(通常为需要应用这些交互和布局约束的内容)
final
- disabled → bool?
-
禁用
final
- focusNode → FocusNode?
-
焦点
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- innerSafeArea → AntdPosition?
-
内部安全区域边距(内容与边界的保留间距)
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- onDoubleTap → VoidCallback?
-
双击事件回调
final
- onFocus → AntdOnFocus?
-
焦点变化回调(当组件获得/失去焦点时触发)
final
- onLayout → AntdOnLayout?
-
布局完成回调(当组件获取到最终尺寸和位置时触发)
参数包含视图的尺寸和全局位置信息
final
- onLongPress → VoidCallback?
-
长按事件回调
final
- onTap → VoidCallback?
-
轻击事件回调
final
- options → AntdTapOptions?
-
高级点击行为配置(控制手势识别阈值和反馈行为)
包括:双击间隔、长按时长、触觉反馈等
final
- outerSafeArea → AntdPosition?
-
外部安全区域边距(通常用于避开系统UI如刘海屏)
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrollController → ScrollController?
-
滚动控制器
final
- style → AntdBoxStyle?
-
样式
finalinherited
-
styleBuilder
→ AntdStyleBuilder<
AntdBoxStyle, AntdBox> ? -
动态样式
finalinherited
Methods
-
buildChild(
BuildContext context) → Widget? -
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< StatefulWidget> -
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
-
getDefaultStyle(
BuildContext context, AntdTheme theme, AntdMapToken token) → AntdBoxStyle -
override
-
getFinalStyle(
BuildContext context, AntdBoxStyle style, AntdMapToken token) → AntdBoxStyle -
inherited
-
getInputStyle(
BuildContext context) → AntdBoxStyle? -
inherited
-
getStyle(
BuildContext context) → AntdBoxStyle -
inherited
-
getStyleBuilder(
BuildContext context) → AntdStyleBuilder< AntdBoxStyle, AntdBox> ? -
inherited
-
getThemeStyle(
BuildContext context, AntdTheme theme) → AntdStyleBuilder< AntdBoxStyle, AntdBox> ? -
override
-
getWidget(
BuildContext context) → AntdBox -
override
-
margeStyle(
AntdBoxStyle defaultStyle, AntdBoxStyle? style) → AntdBoxStyle -
override
-
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