callAutoSuggest method

Future<AutoSuggestResponse?> callAutoSuggest()

Implementation

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