import 'package:diameter/main.dart'; import 'package:objectbox/objectbox.dart'; @Entity() class MealCategory { static final Box box = objectBox.store.box(); int id; String value; String? notes; MealCategory({ this.id = 0, this.value = '', this.notes, }); static MealCategory? get(int id) => box.get(id); static List getAll() => box.getAll(); static void put(MealCategory mealCategory) => box.put(mealCategory); static void remove(int id) => box.remove(id); }