requestSearch method

Future<List<OSMData>> requestSearch({
  1. required Client client,
  2. required String search,
})

Implementation

Future<List<OSMData>> requestSearch(
    {required Client client, required String search}) async {
  var response = await HttpRequestCustom.requestWithSearch(
      client: client, search: search);
  notifyListener();
  if (response.isNotEmpty) {
    return response.map((e) => OSMData.fromJson(e)).toList();
  } else {
    return [];
  }
}