getBox static method

dynamic getBox(
  1. String name
)

Implementation

static getBox(String name) async {
  Box box;
  if (!Hive.isBoxOpen(name)) {
    box = await Hive.openBox(name);
  } else {
    box = Hive.box(name);
  }
  return box;
}