currentLocale top-level property
Returns the current locale in two letter format using deviceLocale
package.
Implementation
Future<String?> get currentLocale async {
final locale = await Devicelocale.currentLocale;
if (locale == null) return null;
return locale.split('-').first;
}