init method

dynamic init()

Implementation

init() async {
  await Hive.initFlutter();
  if (!Hive.isAdapterRegistered(0)) {
    Hive.registerAdapter(AppleHealthElementAdapter());
  }
  if (!Hive.isAdapterRegistered(1)) {
    Hive.registerAdapter(GoogleHealthConnectElementAdapter());
  }
  appleHealthElementBox =
      await Hive.openBox<AppleHealthElement>('apple_heealth_elements');
  googleHealthConnectElementBox =
      await Hive.openBox<GoogleHealthConnectElement>(
          'google_health_connect_elements');
}