Skip to content

Instantly share code, notes, and snippets.

@utkarsh-UK
Last active November 22, 2020 17:28
Show Gist options
  • Save utkarsh-UK/deca1a657687aecceb2224f8ce2f015c to your computer and use it in GitHub Desktop.
Save utkarsh-UK/deca1a657687aecceb2224f8ce2f015c to your computer and use it in GitHub Desktop.
Future<void> saveEventToHive() async {
try {
var box = Hive.openBox('first_box');
box.put('event', 'Cache User');
var event = box.get('event')
box.close();
} on Exception catch (e) {
throw CacheException(message: e.toString());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment