copyWith method Null safety

AppSettings copyWith(
  1. {Locale? locale,
  2. bool? isMetric}
)

Copies the current object editing one or more properties

Implementation

AppSettings copyWith({Locale? locale, bool? isMetric}) {
  return AppSettings(
    locale: locale ?? this.locale,
    isMetric: isMetric ?? isMetric,
  );
}