setCurrentLocale method
Sets the current locale for translations.
Throws an ArgumentError if the locale is empty.
Usage:
localizations.setCurrentLocale(const Locale('fr'));
Implementation
void setCurrentLocale(Locale locale) {
if (locale.languageCode.isEmpty) {
throw ArgumentError('Locale cannot be empty');
}
_currentLocale = locale;
}