copyWith method

ComponentConfig copyWith({
  1. ComponentType? type,
  2. Widget builder(
    1. BuildContext context
    )?,
  3. bool? isFloating,
  4. bool? hasAnimation,
  5. bool? isCollapsible,
  6. bool? initiallyExpanded,
  7. Duration? animationDuration,
  8. AnimationType? animationType,
  9. double? width,
  10. double? height,
  11. EdgeInsets? margin,
  12. EdgeInsets? padding,
  13. Map<String, dynamic>? customProps,
  14. Color? backgroundColor,
  15. bool? showToggleButton,
  16. bool? isShow,
})

复制并修改配置

Implementation

ComponentConfig copyWith({
  ComponentType? type,
  Widget Function(BuildContext context)? builder,
  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,
}) {
  return ComponentConfig(
    type: type ?? this.type,
    builder: builder ?? this.builder,
    isFloating: isFloating ?? this.isFloating,
    hasAnimation: hasAnimation ?? this.hasAnimation,
    isCollapsible: isCollapsible ?? this.isCollapsible,
    initiallyExpanded: initiallyExpanded ?? this.initiallyExpanded,
    animationDuration: animationDuration ?? this.animationDuration,
    animationType: animationType ?? this.animationType,
    width: width ?? this.width,
    height: height ?? this.height,
    margin: margin ?? this.margin,
    padding: padding ?? this.padding,
    customProps: customProps ?? this.customProps,
    backgroundColor: backgroundColor ?? this.backgroundColor,
    showToggleButton: showToggleButton ?? this.showToggleButton,
    isShow: isShow ?? this.isShow,
  );
}