copyWith method

RCKReferenceStyleConfig copyWith({
  1. Color? backgroundColor,
  2. TextStyle? textStyle,
  3. EdgeInsets? padding,
  4. double? spacingToContent,
})

创建一个新的配置,覆盖当前配置的某些属性

Implementation

RCKReferenceStyleConfig copyWith({
  Color? backgroundColor,
  TextStyle? textStyle,
  EdgeInsets? padding,
  double? spacingToContent,
}) {
  return RCKReferenceStyleConfig(
    backgroundColor: backgroundColor ?? this.backgroundColor,
    textStyle: textStyle ?? this.textStyle,
    padding: padding ?? this.padding,
    spacingToContent: spacingToContent ?? this.spacingToContent,
  );
}