update method

UpdatedLocale update({
  1. String? code,
  2. List<String>? months,
  3. List<String>? monthsShort,
  4. List<String>? weekdays,
  5. List<String>? weekdaysShort,
  6. List<String>? weekdaysMin,
  7. int? weekStart,
  8. int? yearStart,
  9. String? invalidDate,
  10. HoraFormats? formats,
  11. HoraRelativeTime? relativeTime,
  12. String ordinal(
    1. int n,
    2. String? unit
    )?,
  13. String meridiem(
    1. int hour,
    2. int minute, {
    3. bool lowercase,
    })?,
})

Creates a new locale with updated properties.

Any properties not specified will use the original locale's values.

Implementation

UpdatedLocale update({
  String? code,
  List<String>? months,
  List<String>? monthsShort,
  List<String>? weekdays,
  List<String>? weekdaysShort,
  List<String>? weekdaysMin,
  int? weekStart,
  int? yearStart,
  String? invalidDate,
  HoraFormats? formats,
  HoraRelativeTime? relativeTime,
  String Function(int n, String? unit)? ordinal,
  String Function(int hour, int minute, {bool lowercase})? meridiem,
}) {
  _validateLocaleOverrides(
    code: code,
    months: months,
    monthsShort: monthsShort,
    weekdays: weekdays,
    weekdaysShort: weekdaysShort,
    weekdaysMin: weekdaysMin,
    weekStart: weekStart,
    yearStart: yearStart,
  );
  return UpdatedLocale(
    this,
    code: code,
    months: months,
    monthsShort: monthsShort,
    weekdays: weekdays,
    weekdaysShort: weekdaysShort,
    weekdaysMin: weekdaysMin,
    weekStart: weekStart,
    yearStart: yearStart,
    invalidDate: invalidDate,
    formats: formats,
    relativeTime: relativeTime,
    ordinal: ordinal,
    meridiem: meridiem,
  );
}