selectLocale static method

void selectLocale(
  1. BuildContext context, [
  2. String? reason
])

Implementation

static void selectLocale(BuildContext context, [String? reason]) async {
  try {
    if (i._delegate == null) return null;
    final locale = await i._delegate!.select(context, reason);
    if (locale == null) return null;
    changeLocale(locale);
  } catch (msg) {
    i._log(msg);
  }
}