init static method

Future<void> init([
  1. String? subDir
])

Initialize Hive DB with the path from getApplicationDocumentsDirectory

Implementation

static Future<void> init([String? subDir]) async {
  await Hive.initFlutter(subDir);
  Hive.registerAdapter(CacheAdapter());
}