copyWith method

  1. @override
Protocol copyWith({
  1. bool? useMaterial3,
  2. CreateTheme? theme,
  3. UpdateTheme? updateTheme,
  4. CreateExtensions? extensions,
  5. UpdateExtensions? updateExtensions,
})
override

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

Implementation

@override
Protocol copyWith({
  bool? useMaterial3,
  CreateTheme? theme,
  UpdateTheme? updateTheme,
  CreateExtensions? extensions,
  UpdateExtensions? updateExtensions,
}) {
  return Protocol(
    useMaterial3: useMaterial3 ?? this.useMaterial3,
    theme: theme ?? this.theme,
    //...Theme Features
    extensions: extensions ?? this.extensions,
    updateTheme: updateTheme ?? this.updateTheme,
    updateExtensions: updateExtensions ?? this.updateExtensions,
  );
}