getDeviceLocal function

Locale getDeviceLocal(
  1. String locale
)

Implementation

Locale getDeviceLocal(String locale) {
  Map<String, Locale> map = {
    'zh': const Locale('zh', 'CN'),
    'en': const Locale('en', 'US'),
  };
  return map[locale] ?? const Locale('zh', 'CN');
}