TrafficIncidentsQueryCallback typedef

TrafficIncidentsQueryCallback = void Function(TrafficQueryError? queryError, List<TrafficIncident>? result)

Callback passed to TrafficEngine.queryForIncidentsInCorridor.

The method will be called on the main thread when a search call has been completed. The first argument is the error in the case of the failure. It is null for an operation that succeeds. The second argument is the list of incidents in the case of the success. It is null in case of an error.

  • queryError The error in the case of the failure. It is null for an operation that succeeds.

  • result The list of incidents in the case of the success. It is null in case of an error.

Implementation

typedef TrafficIncidentsQueryCallback = void Function(TrafficQueryError? queryError, List<TrafficIncident>? result);