ComponentConfig class
组件配置基类
- Implementers
Constructors
-
ComponentConfig({ComponentType? type, Widget builder(BuildContext context)?, bool? isFloating, bool? isDraggable, bool? dragSnapToEdge, bool? hasAnimation, bool? isCollapsible, bool? initiallyExpanded, Color? backgroundColor, Duration? animationDuration, AnimationType? animationType, double? width, double? height, double? top, double? left, double? bottom, double? right, EdgeInsets? margin, EdgeInsets? padding, Map<
String, dynamic> ? customProps, bool? showToggleButton, bool? isShow}) -
const
-
ComponentConfig.fromJson(Map<
String, dynamic> json) -
从 JSON 创建 ComponentConfig 实例
factory
Properties
- animationDuration → Duration
-
final
- animationType → AnimationType?
-
final
- backgroundColor → Color?
-
final
- bottom → double?
-
final
- builder → Widget Function(BuildContext context)?
-
final
-
customProps
→ Map<
String, dynamic> ? -
final
- dragSnapToEdge → bool
-
final
- hasAnimation → bool
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → double?
-
final
- initiallyExpanded → bool
-
final
- isCollapsible → bool
-
final
- isDraggable → bool
-
final
- isFloating → bool
-
final
- isShow → bool
-
新增:是否显示该组件
final
- isValid → bool
-
验证配置有效性
no setter
- left → double?
-
final
- margin → EdgeInsets?
-
final
- padding → EdgeInsets?
-
final
- right → double?
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showToggleButton → bool
-
新增:是否显示切换按钮
final
- top → double?
-
final
- type → ComponentType?
-
final
- width → double?
-
final
Methods
-
copyWith(
{ComponentType? type, Widget builder(BuildContext context)?, bool? isFloating, bool? isDraggable, bool? dragSnapToEdge, bool? hasAnimation, bool? isCollapsible, bool? initiallyExpanded, Duration? animationDuration, AnimationType? animationType, double? width, double? height, double? top, double? left, double? bottom, double? right, EdgeInsets? margin, EdgeInsets? padding, Map< String, dynamic> ? customProps, Color? backgroundColor, bool? showToggleButton, bool? isShow}) → ComponentConfig - 复制并修改配置
-
mergeWith(
ComponentConfig patch) → ComponentConfig -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - 转换为 JSON
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited