getSystemLocales function
The device's preferred locales in priority order.
Use this when the user has more than one language enabled and you
want to fall back to a second-best choice if the primary one is
missing translations. On Web this is navigator.languages; on the
native platforms it's the user's ordered language list.
Implementation
List<Locale> getSystemLocales() {
return WidgetsBinding.instance.platformDispatcher.locales;
}