copyWith method

  1. @override
FastAppSettingsDocument copyWith({
  1. String? languageCode,
  2. ValueGetter<String?>? countryCode,
  3. String? theme,
  4. String? primaryCurrencyCode,
  5. String? secondaryCurrencyCode,
  6. bool? saveEntry,
  7. bool? use24HourFormat,
})
override

Creates a new FastAppSettingsDocument object with updated property values.

If any of the optional properties (languageCode, countryCode, theme, secondaryCurrencyCode) are not provided, the current values are retained.

Implementation

@override

/// Creates a new [FastAppSettingsDocument] object with updated property
/// values.
///
/// If any of the optional properties ([languageCode], [countryCode], [theme],
/// [secondaryCurrencyCode]) are not provided, the current values are
/// retained.
FastAppSettingsDocument copyWith({
  String? languageCode,
  ValueGetter<String?>? countryCode,
  String? theme,
  String? primaryCurrencyCode,
  String? secondaryCurrencyCode,
  bool? saveEntry,
  bool? use24HourFormat,
}) =>
    FastAppSettingsDocument(
      languageCode: languageCode ?? this.languageCode,
      countryCode: countryCode != null ? countryCode() : this.countryCode,
      theme: theme ?? this.theme,
      primaryCurrencyCode: primaryCurrencyCode ?? this.primaryCurrencyCode,
      secondaryCurrencyCode:
          secondaryCurrencyCode ?? this.secondaryCurrencyCode,
      saveEntry: saveEntry ?? this.saveEntry,
      use24HourFormat: use24HourFormat ?? this.use24HourFormat,
    );