loadBoxes method
Implementation
Future<void> loadBoxes() async {
try {
_storedFinalizedMatches =
await Hive.openBox<EphemeralScoutingData>(_BOX_NAME);
} catch (e) {
Debug().warn(
"Failed to find the allocated Hive DB! Maybe this is the first time? Trying to set it manually [Fault: $e}]");
_storedFinalizedMatches = await Hive.openBox(_BOX_NAME);
_storedFinalizedMatches.flush();
}
Debug().info(
"Finished loading the 'storedFinalizedMatches' box containing ${_storedFinalizedMatches.length} entries. Found ${validateAllEntriesVersion().failedIds.length} entries that had conflicting telemetry versions.");
}