addLogEntry method

void addLogEntry({
  1. required int testEntryId,
  2. required int logEntryId,
  3. required List<LogSubEntry> subEntries,
})
inherited

Implementation

void addLogEntry({required int testEntryId, required int logEntryId, required List<LogSubEntry> subEntries}) {
  logSubEntryInEntry[logEntryId] ??= ObservableList();

  for (final subEntry in subEntries) {
    final subEntryId = subEntry.id.toInt();
    logSubEntryMap[subEntryId] = subEntry;
    logSubEntryInEntry[logEntryId]!.add(subEntryId);
    logEntryIdOfLogSubEntry[subEntryId] = logEntryId;
    logSubEntryIdOfTime[subEntry.time.toInt()] = subEntryId;
  }

  if (!(logEntryInTest[testEntryId]?.contains(logEntryId) ?? false)) {
    logEntryInTest.addRelation(testEntryId, logEntryId);
    testIdOfLogEntry[logEntryId] = testEntryId;
  }
}