replaceLast method
Replace last LocaleName in this list.
Implementation
bool replaceLast({String? str, LocaleName? localeName}) {
LocaleName? entry = localeName;
if (str != null) {
entry ??= LocaleMatcher.byName(str);
}
if (entry != null) {
locales.last = entry.locale;
names.last = entry.name;
entries.last = entry;
return true;
}
return false;
}