getAcceptLanguages method

Future<List<String>> getAcceptLanguages()

Gets the accept-languages of the browser. This is different from the locale used by the browser; to get the locale, use i18n.getUILanguage.

Implementation

Future<List<String>> getAcceptLanguages() async {
  var $res =
      await promiseToFuture<JSArray>($js.chrome.i18n.getAcceptLanguages());
  return $res.toDart.cast<$js.LanguageCode>().map((e) => e).toList();
}