callTextSearch method

Future<AutoSuggestResponse?> callTextSearch()

Implementation

Future<AutoSuggestResponse?> callTextSearch() async {
  try {
    String? result = await restApi.textSearch(toMap());
    return result != null
        ? AutoSuggestResponse.fromMap(json.decode(result))
        : null;
  } on PlatformException catch (e) {
    return Future.error(e);
  }
}