SearchCallback typedef

SearchCallback = void Function(SearchError? searchError, List<Place>? places)

The method will be called on the main thread when a search call has been completed.

The first argument indicates an error in case of a failure. The second argument contains the results. Both arguments cannot be null at the same time - or not null at the same time.

  • searchError An error enum indicating what went wrong. It is null for an operation that succeeds.

  • places The list of search results. It is null in case of an error.

Implementation

typedef SearchCallback = void Function(SearchError? searchError, List<Place>? places);