CustomComponentConfig class

自定义组件配置类

Inheritance

Constructors

CustomComponentConfig({required Widget builder(BuildContext context), double? top, double? left, double? bottom, double? right, bool hasAnimation = false, bool isCollapsible = false, bool initiallyExpanded = true, Duration animationDuration = const Duration(milliseconds: 300), AnimationType? animationType, double? width, double? height, EdgeInsets? margin, EdgeInsets? padding, Map<String, dynamic>? customProps, bool showToggleButton = true, bool isShow = true})
const
CustomComponentConfig.fromJson(Map<String, dynamic> json, {required Widget builder(BuildContext context)})
从 JSON 创建 CustomComponentConfig 实例 注意:builder 无法从 JSON 反序列化,需要在创建后手动设置
factory

Properties

animationDuration Duration
finalinherited
animationType AnimationType?
finalinherited
backgroundColor Color?
finalinherited
bottom double?
final
builder Widget Function(BuildContext context)?
finalinherited
customProps Map<String, dynamic>?
finalinherited
hasAnimation bool
finalinherited
hashCode int
The hash code for this object.
no setterinherited
height double?
finalinherited
initiallyExpanded bool
finalinherited
isCollapsible bool
finalinherited
isFloating bool
finalinherited
isShow bool
新增:是否显示该组件
finalinherited
isValid bool
验证配置有效性
no setterinherited
left double?
final
margin EdgeInsets?
finalinherited
padding EdgeInsets?
finalinherited
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showToggleButton bool
新增:是否显示切换按钮
finalinherited
top double?
final
type ComponentType?
finalinherited
width double?
finalinherited

Methods

copyWith({ComponentType? type, Widget builder(BuildContext context)?, bool? isFloating, bool? hasAnimation, bool? isCollapsible, bool? initiallyExpanded, Duration? animationDuration, AnimationType? animationType, double? width, double? height, EdgeInsets? margin, EdgeInsets? padding, Map<String, dynamic>? customProps, Color? backgroundColor, bool? showToggleButton, bool? isShow}) ComponentConfig
复制并修改配置
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
转换为 JSON
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited