loadBoxes method

Future<void> loadBoxes()

Implementation

Future<void> loadBoxes() async {
  try {
    _storedFinalizedMatches =
        await Hive.openBox<EphemeralScoutingData>(_BOX_NAME);
  } catch (e) {
    Debug().warn(
        "[DUC_BOX] 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(
      "[DUC_BOX] Finished loading the 'storedFinalizedMatches' box containing ${_storedFinalizedMatches.length} entries. Found ${validateAllEntriesVersion().failedIds.length} entries that had conflicting telemetry versions.");
}