copyWith method

AppPreferences copyWith({
  1. String? locale,
  2. TextSizePreference? textSize,
  3. AppThemeMode? themeMode,
  4. bool? notificationsEnabled,
  5. bool? highContrastEnabled,
})

Implementation

AppPreferences copyWith({
  String? locale,
  TextSizePreference? textSize,
  AppThemeMode? themeMode,
  bool? notificationsEnabled,
  bool? highContrastEnabled,
}) {
  return AppPreferences(
    locale: locale ?? this.locale,
    textSize: textSize ?? this.textSize,
    themeMode: themeMode ?? this.themeMode,
    notificationsEnabled: notificationsEnabled ?? this.notificationsEnabled,
    highContrastEnabled: highContrastEnabled ?? this.highContrastEnabled,
  );
}