copyWith method

ArnaTextTheme copyWith({
  1. TextStyle? displayTextStyle,
  2. TextStyle? headlineTextStyle,
  3. TextStyle? titleTextStyle,
  4. TextStyle? bodyTextStyle,
  5. TextStyle? subtitleTextStyle,
  6. TextStyle? buttonTextStyle,
  7. TextStyle? captionTextStyle,
})

Creates a copy of this text theme but with the given fields replaced with the new values.

Consider using ArnaTypography.light or ArnaTypography.dark as a starting point.

See also:

  • merge is used instead of copyWith when you want to merge all of the fields of a TextTheme instead of individual fields.

Implementation

ArnaTextTheme copyWith({
  TextStyle? displayTextStyle,
  TextStyle? headlineTextStyle,
  TextStyle? titleTextStyle,
  TextStyle? bodyTextStyle,
  TextStyle? subtitleTextStyle,
  TextStyle? buttonTextStyle,
  TextStyle? captionTextStyle,
}) {
  return ArnaTextTheme(
    displayTextStyle: displayTextStyle ?? _displayTextStyle,
    headlineTextStyle: headlineTextStyle ?? _headlineTextStyle,
    titleTextStyle: titleTextStyle ?? _titleTextStyle,
    bodyTextStyle: bodyTextStyle ?? _bodyTextStyle,
    subtitleTextStyle: subtitleTextStyle ?? _subtitleTextStyle,
    buttonTextStyle: buttonTextStyle ?? _buttonTextStyle,
    captionTextStyle: captionTextStyle ?? _captionTextStyle,
  );
}