getLocations method

  1. @override
Future<List<String>> getLocations()
override

Implementation

@override
Future<List<String>> getLocations() async {
  try {
    final result = await methodChannel.invokeMethod('getLocations');
    if (result is List) {
      return result.cast<String>();
    }
    return [];
  } on PlatformException catch (e) {
    debugPrint('Error calling getLocations: ${e.message}');
    return [];
  }
}