searchPlaces method

  1. @override
Future<List<Map<Object?, Object?>>> searchPlaces(
  1. String keyword, {
  2. double? latitude,
  3. double? longitude,
})
override

Implementation

@override
Future<List<Map<Object?, Object?>>> searchPlaces(
  String keyword, {
  double? latitude,
  double? longitude,
}) async {
  final results = await methodChannel.invokeListMethod<Object?>(
    'searchPlaces',
    <String, Object?>{
      'keyword': keyword,
      'latitude': latitude,
      'longitude': longitude,
    },
  );
  return (results ?? const <Object?>[])
      .whereType<Map<Object?, Object?>>()
      .toList(growable: false);
}