copyWith method

MaterialAppState copyWith({
  1. Locale? locale,
  2. Brightness? brightness,
})

Returns a copy with the given fields replaced.

Implementation

MaterialAppState copyWith({
  Locale? locale,
  Brightness? brightness,
}) {
  return MaterialAppState(
    locale: locale ?? this.locale,
    brightness: brightness ?? this.brightness,
  );
}