copyWith method

  1. @override
RPColors copyWith({
  1. Color? primary,
  2. Color? warningColor,
  3. Color? backgroundGray,
  4. Color? tabBarBackground,
  5. Color? white,
  6. Color? grey50,
  7. Color? grey100,
  8. Color? grey200,
  9. Color? grey300,
  10. Color? grey400,
  11. Color? grey500,
  12. Color? grey600,
  13. Color? grey700,
  14. Color? grey800,
  15. Color? grey900,
  16. Color? grey950,
})
override

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

Implementation

@override
RPColors copyWith(
    {Color? primary,
    Color? warningColor,
    Color? backgroundGray,
    Color? tabBarBackground,
    Color? white,
    Color? grey50,
    Color? grey100,
    Color? grey200,
    Color? grey300,
    Color? grey400,
    Color? grey500,
    Color? grey600,
    Color? grey700,
    Color? grey800,
    Color? grey900,
    Color? grey950}) {
  return RPColors(
    primary: primary ?? this.primary,
    warningColor: warningColor ?? this.warningColor,
    backgroundGray: backgroundGray ?? this.backgroundGray,
    tabBarBackground: tabBarBackground ?? this.tabBarBackground,
    white: white ?? this.white,
    grey50: grey50 ?? this.grey50,
    grey100: grey100 ?? this.grey100,
    grey200: grey200 ?? this.grey200,
    grey300: grey300 ?? this.grey300,
    grey400: grey400 ?? this.grey400,
    grey500: grey500 ?? this.grey500,
    grey600: grey600 ?? this.grey600,
    grey700: grey700 ?? this.grey700,
    grey800: grey800 ?? this.grey800,
    grey900: grey900 ?? this.grey900,
    grey950: grey950 ?? this.grey950,
  );
}