copyWith method

ThemeParameters copyWith({
  1. int? backgroundColor,
  2. int? secondaryBackgroundColor,
  3. int? headerBackgroundColor,
  4. int? sectionBackgroundColor,
  5. int? textColor,
  6. int? accentTextColor,
  7. int? sectionHeaderTextColor,
  8. int? subtitleTextColor,
  9. int? destructiveTextColor,
  10. int? hintColor,
  11. int? linkColor,
  12. int? buttonColor,
  13. int? buttonTextColor,
})

Returns a copy with the given fields replaced. For a nullable field pass a function, e.g. field: () => null to clear it.

Implementation

ThemeParameters copyWith({
  int? backgroundColor,
  int? secondaryBackgroundColor,
  int? headerBackgroundColor,
  int? sectionBackgroundColor,
  int? textColor,
  int? accentTextColor,
  int? sectionHeaderTextColor,
  int? subtitleTextColor,
  int? destructiveTextColor,
  int? hintColor,
  int? linkColor,
  int? buttonColor,
  int? buttonTextColor,
}) =>
    ThemeParameters(
      backgroundColor: backgroundColor ?? this.backgroundColor,
      secondaryBackgroundColor:
          secondaryBackgroundColor ?? this.secondaryBackgroundColor,
      headerBackgroundColor:
          headerBackgroundColor ?? this.headerBackgroundColor,
      sectionBackgroundColor:
          sectionBackgroundColor ?? this.sectionBackgroundColor,
      textColor: textColor ?? this.textColor,
      accentTextColor: accentTextColor ?? this.accentTextColor,
      sectionHeaderTextColor:
          sectionHeaderTextColor ?? this.sectionHeaderTextColor,
      subtitleTextColor: subtitleTextColor ?? this.subtitleTextColor,
      destructiveTextColor: destructiveTextColor ?? this.destructiveTextColor,
      hintColor: hintColor ?? this.hintColor,
      linkColor: linkColor ?? this.linkColor,
      buttonColor: buttonColor ?? this.buttonColor,
      buttonTextColor: buttonTextColor ?? this.buttonTextColor,
    );