localeToString function
Converts a Locale to its corresponding language code string.
Returns null if the provided locale
is null.
locale
The locale to convert to a language code.
Implementation
String? localeToString(final Locale? locale) => locale?.languageCode;