copyWith method

  1. @override
PlexThemeData copyWith({
  1. PlexColorTokens? colors,
  2. String? fontFamily,
  3. PlexDensity? density,
})
override

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

Implementation

@override
PlexThemeData copyWith({
  PlexColorTokens? colors,
  String? fontFamily,
  PlexDensity? density,
}) {
  return PlexThemeData(
    colors: colors ?? this.colors,
    fontFamily: fontFamily ?? this.fontFamily,
    density: density ?? this.density,
  );
}