initialize method

Future<void> initialize()

Implementation

Future<void> initialize() async {
  if (isInitialized) return;

  if (baseDirFn == null) {
    throw UnsupportedError('''
A base directory path MUST be supplied to
the hiveLocalStorageProvider via the `baseDirFn`
callback.

In Flutter, `baseDirFn` will be supplied automatically if
the `path_provider` package is in `pubspec.yaml` AND
Flutter Data is properly configured:

Did you supply the override?

Widget build(context) {
return ProviderContainer(
  overrides: [
    configureRepositoryLocalStorage()
  ],
  child: MaterialApp(
''');
  }

  final path = path_helper.join(await baseDirFn!(), 'flutter_data');
  hive.init(path);

  isInitialized = true;
}