TrafficFlowQueryCallback typedef
Callback passed to following functions: TrafficEngine.queryForFlowInBox TrafficEngine.queryForFlowInCircle TrafficEngine.queryForFlowInCorridor 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 flow items in the case of the success. It is null in case of an error.
-
queryErrorThe error in the case of the failure. It isnullfor an operation that succeeds. -
resultThe list of incidents in the case of the success. It isnullin case of an error.
Note: This is a beta release of this feature, so there could be a few bugs and unexpected behaviors. Related APIs may change for new releases without a deprecation process.
Implementation
typedef TrafficFlowQueryCallback = void Function(TrafficQueryError? queryError, List<TrafficFlow>? result);