Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LocaleCachingService created using by Hive. #6

Merged
merged 2 commits into from Jan 15, 2022

Conversation

E-MRE
Copy link
Owner

@E-MRE E-MRE commented Jan 15, 2022

HiveCachingManager created.

Future<void> examples() async {
    var isSaved = await _cachingService.setValue<String>('Test', 'My data');
    print(isSaved.toString());

    var myDataCache =
        await _cachingService.getValue<String>('Test', defaultValue: '');
    var myDataHive =
        await _hiveService.getValue<String>('Test', defaultValue: '');

    print(myDataCache?.toString() ?? 'error cache');
    print(myDataHive?.toString() ?? 'error hive');

    var isOpen = _hiveService.isBoxOpen('Test');
    if (isOpen) {
      await _hiveService.close<String>('Test');
    }

    var isDeleted = await _cachingService.deleteValue('Test');
    print('Is Deleted: $isDeleted');
  }

@E-MRE E-MRE self-assigned this Jan 15, 2022
@E-MRE E-MRE merged commit 737dd96 into main Jan 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant