getCombinedAnalysis method
Combine analyses from multiple sessions within a time range into a single aggregated DriverBehaviourAnalysis.
Parameters
startTime: The start of the time range (inclusive).endTime: The end of the time range (inclusive).
Returns
- A combined DriverBehaviourAnalysis summarizing all analyses in the interval, or null if the operation failed or no valid data is available.
Also see:
- getAllDriverBehaviourAnalyses - To retrieve all stored analyses.
- eraseAnalysesOlderThan - To delete old analyses from storage.
Implementation
DriverBehaviourAnalysis? getCombinedAnalysis(
DateTime startTime,
DateTime endTime,
) {
final OperationResult resultString = objectMethod(
pointerId,
'DriverBehaviour',
'getCombinedAnalysis',
args: <String, dynamic>{
'first': startTime.millisecondsSinceEpoch,
'second': endTime.millisecondsSinceEpoch,
},
);
if (resultString['result'] == -1 || resultString['gemApiError'] != 0) {
return null;
}
return DriverBehaviourAnalysis.init(resultString['result']);
}