addLocale static method

bool addLocale(
  1. Locale arg
)

添加语言

arg 语言类

Implementation

static bool addLocale(Locale arg) {
  if (_locales
      .where((element) => element.name == arg.name)
      .toList()
      .isNotEmpty) {
    return false;
  }
  _locales.add(arg);
  return true;
}