copyWith method

  1. @override
ThemeExtension<DPTypography> copyWith({
  1. Color? defaultColor,
  2. TextStyle? title,
  3. TextStyle? header1,
  4. TextStyle? header2,
  5. TextStyle? itemTitle,
  6. TextStyle? itemDescription,
  7. TextStyle? description,
  8. TextStyle? readable,
  9. TextStyle? token,
  10. TextStyle? hint,
  11. TextStyle? paragraph1,
  12. TextStyle? paragraph2,
  13. TextStyle? paragraph1Underlined,
  14. TextStyle? paragraph2Underlined,
})
override

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

Implementation

@override
ThemeExtension<DPTypography> copyWith({
  Color? defaultColor,
  TextStyle? title,
  TextStyle? header1,
  TextStyle? header2,
  TextStyle? itemTitle,
  TextStyle? itemDescription,
  TextStyle? description,
  TextStyle? readable,
  TextStyle? token,
  TextStyle? hint,
  TextStyle? paragraph1,
  TextStyle? paragraph2,
  TextStyle? paragraph1Underlined,
  TextStyle? paragraph2Underlined,
}) {
  return DPTypography(
    defaultColor: defaultColor ?? this.defaultColor,
    title: title ?? this.title,
    header1: header1 ?? this.header1,
    header2: header2 ?? this.header2,
    itemTitle: itemTitle ?? this.itemTitle,
    itemDescription: itemDescription ?? this.itemDescription,
    description: description ?? this.description,
    readable: readable ?? this.readable,
    token: token ?? this.token,
    hint: hint ?? this.hint,
    paragraph1: paragraph1 ?? this.paragraph1,
    paragraph2: paragraph2 ?? this.paragraph2,
    paragraph1Underlined: paragraph1Underlined ?? this.paragraph1Underlined,
    paragraph2Underlined: paragraph2Underlined ?? this.paragraph2Underlined,
  );
}