getLocale method

  1. @override
Future<Locale> getLocale()
override

Implementation

@override
Future<Locale> getLocale() async {
  final result = await methodChannel.invokeMethod<String>('getLocale');
  final split = result?.split('-');
  return Locale(split?.firstOrNull ?? '', split?.lastOrNull);
}