initDb static method

Future<void> initDb()

Implementation

static Future<void> initDb() async {
  await Hive.initFlutter();

  box = await Hive.openBox(kMlTranslator);

  final detectionDialogShown = box!.get(kAutoDetectionDialog);

  if (detectionDialogShown == null || !detectionDialogShown) {
    showTranslationDialog = true;

    box!.put(kAutoDetectionDialog, false);
  }
}