copyWith method

NomoThemeData copyWith({
  1. NomoColorThemeData? colorTheme,
  2. NomoTypographyTheme? typographyTheme,
  3. NomoSizingThemeData? sizingTheme,
  4. NomoComponentConstants? constants,
})

Implementation

NomoThemeData copyWith({
  NomoColorThemeData? colorTheme,
  NomoTypographyTheme? typographyTheme,
  NomoSizingThemeData? sizingTheme,
  NomoComponentConstants? constants,
}) {
  return NomoThemeData(
    colorTheme: colorTheme ?? this.colorTheme,
    textTheme: (typographyTheme ?? typography).copyWith(
      colors: colorTheme?.colors,
      sizes: sizingTheme?.sizes,
    ),
    sizingTheme: sizingTheme ?? this.sizingTheme,
    constants: constants ?? this.constants,
  );
}