asyncUpdateToFromData method
- void onCompleteCallback(
- GemError err
Update the local data needed for 'from' and 'to' landmarks address and description.
Parameters
- IN onCompleteCallback The callback that completes with the result of the operation:
- GemError.success if the operation suceeded
- GemError.invalidInput if the operation is not available for the current event or if an update has already been completed
- GemError.inUse if the operation is already in progress
- Other errors if the operation failed
Throws
- An exception if it fails.
Implementation
void asyncUpdateToFromData(
final void Function(GemError err) onCompleteCallback,
) {
final EventDrivenProgressListener listener = EventDrivenProgressListener();
GemKitPlatform.instance.registerEventHandler(listener.id, listener);
listener.registerOnCompleteWithDataCallback((
final int err,
final _,
final __,
) {
onCompleteCallback(GemErrorExtension.fromCode(err));
});
final OperationResult resultString = objectMethod(
_pointerId,
'RouteTrafficEvent',
'asyncUpdateToFromData',
args: listener.id,
);
final int error = resultString['gemApiError'];
if (error != 0) {
onCompleteCallback(GemErrorExtension.fromCode(error));
}
}