smartSearch method

  1. @override
Future<List<CityResult>> smartSearch(
  1. String query
)
override

Smart search - searches across cities, states, and countries

Implementation

@override
Future<List<CityResult>> smartSearch(String query) async {
  final result = await methodChannel.invokeMethod<List>('smartSearch', {
    'query': query,
  });
  return (result ?? [])
      .map((e) => CityResult.fromMap(Map<String, dynamic>.from(e as Map)))
      .toList();
}