copyWith method

  1. @override
AppButtonTheme copyWith({
  1. ButtonStyle? primary,
  2. ButtonStyle? neutral,
  3. ButtonStyle? destructive,
})
override

Creates a copy of this theme extension with the given fields replaced by the non-null parameter values.

Implementation

@override
AppButtonTheme copyWith({
  ButtonStyle? primary,
  ButtonStyle? neutral,
  ButtonStyle? destructive,
}) {
  return AppButtonTheme(
    primary: primary ?? this.primary,
    neutral: neutral ?? this.neutral,
    destructive: destructive ?? this.destructive,
  );
}