errorOccurred static method

String errorOccurred(
  1. BuildContext context
)

Implementation

static String errorOccurred(BuildContext context) {
  final locale = Localizations.maybeLocaleOf(context)
    ?? PlatformDispatcher.instance.locale;

  switch (locale.languageCode) {
    case _localeFr: return "Une erreur est survenue";
    case _localeEn:
    default:
      return "error occured";
  }
}