When you store custom objects in Hive you can extend HiveObject to manage your objects easily.HiveObject provides the key of your object and useful helper methods like save() or delete().

Here is an example how to use HiveObject:

class Person extends HiveObject {
String name;
int age;
var box ='persons');
var person = Person() = 'Lisa'
..age = 32;
box.add(person); // Store this object for the first time
print('New key of Lisa: ' + person.key);
person.age = 35;; // Update object
person.delete(); // Remove object from Hive

You also need to extend HiveObject if you want to use queries.