Record Events
Flutter ==> Core module
An event is fired each time a record is submitted to the Validic API. A success event is emitted after a record has successfully uploaded to the server, and an error event is emitted if a record upload fails for any reason. Registration of listeners is typically done during app initialization to catch events for record uploads which may occur upon app launch.
void listenToEvents() {
ValidicCore.onSessionEnd.listen((event) {
print('Session ended: ${event.userID} with ${event.records.length} unsent Records');
});
ValidicCore.onRecordSubmit.listen((event) {
print('Record submitted: ${event.record}');
});
ValidicCore.onRecordSubmitError.listen((event) {
print('Record submission error: ${event.error}');
});
}
Updated 1 day ago