You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
401 B
23 lines
401 B
4 years ago
|
import 'package:flutter/material.dart';
|
||
|
|
||
|
enum SupportedLocale {
|
||
|
zh_CN,
|
||
|
en,
|
||
|
}
|
||
|
|
||
|
const zh_CN = Locale('zh', 'CN');
|
||
|
const en = Locale('en');
|
||
|
|
||
|
const supportedLocales = [
|
||
|
zh_CN,
|
||
|
en,
|
||
|
];
|
||
|
|
||
|
const supportedLocaleNames = {
|
||
|
SupportedLocale.zh_CN: '简体中文',
|
||
|
SupportedLocale.en: 'English',
|
||
|
};
|
||
|
|
||
|
Locale getSupportedLocale(SupportedLocale supportedLocale) => supportedLocales[supportedLocale.index];
|
||
|
|