copyWith method

  1. @override
CheckoutTheme copyWith({
  1. Color? appBarBackgroundColor,
  2. Color? collapsedTitleColor,
  3. Color? chargeAmountColor,
  4. Color? nativePayBackgroundColor,
  5. Color? nativePayForegroundColor,
  6. Color? cashPayBackgroundColor,
  7. Color? cashPayForegroundColor,
})
override

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

Implementation

@override
CheckoutTheme copyWith({
  Color? appBarBackgroundColor,
  Color? collapsedTitleColor,
  Color? chargeAmountColor,
  Color? nativePayBackgroundColor,
  Color? nativePayForegroundColor,
  Color? cashPayBackgroundColor,
  Color? cashPayForegroundColor,
}) {
  return CheckoutTheme(
    appBarBackgroundColor: appBarBackgroundColor ?? this.appBarBackgroundColor,
    collapsedTitleColor: collapsedTitleColor ?? this.collapsedTitleColor,
    chargeAmountColor: chargeAmountColor ?? this.chargeAmountColor,
    nativePayBackgroundColor:
        nativePayBackgroundColor ?? this.nativePayBackgroundColor,
    nativePayForegroundColor:
        nativePayForegroundColor ?? this.nativePayForegroundColor,
    cashPayBackgroundColor:
        cashPayBackgroundColor ?? this.cashPayBackgroundColor,
    cashPayForegroundColor:
        cashPayForegroundColor ?? this.cashPayForegroundColor,
  );
}