initiaLized method

Future<void> initiaLized({
  1. Map? defaultData,
})

Implementation

Future<void> initiaLized({
  Map<dynamic, dynamic>? defaultData,
}) async {
  if (isInitialized) {
    return;
  }
  stateData.clear();
  try {
    setDefaultData(
      defaultData: json.decode(decrypt(
        data_base64: await readAsync(),
        databaseMiniGeneralLibraryBaseOptions:
            databaseMiniGeneralLibraryBaseOptions,
      )),
    );
  } catch (e) {
    if (databaseMiniGeneralLibraryBaseOptions.isIgnoreError == false) {
      rethrow;
    }
  }
  this.defaultData = defaultData ?? {};
  setDefaultData(defaultData: this.defaultData);
  isInitialized = true;
}