copyWith method

CNButtonTheme copyWith({
  1. Color? tint,
  2. Color? labelColor,
  3. Color? iconColor,
  4. Color? backgroundColor,
  5. CNButtonGlassMaterial? glassMaterial,
  6. TextStyle? labelStyle,
})

Creates a copy of this theme with the given fields replaced.

Implementation

CNButtonTheme copyWith({
  Color? tint,
  Color? labelColor,
  Color? iconColor,
  Color? backgroundColor,
  CNButtonGlassMaterial? glassMaterial,
  TextStyle? labelStyle,
}) {
  return CNButtonTheme(
    tint: tint ?? this.tint,
    labelColor: labelColor ?? this.labelColor,
    iconColor: iconColor ?? this.iconColor,
    backgroundColor: backgroundColor ?? this.backgroundColor,
    glassMaterial: glassMaterial ?? this.glassMaterial,
    labelStyle: labelStyle ?? this.labelStyle,
  );
}