HiveStore constructor

HiveStore([
  1. Box<Map?>? box
])

Creates a HiveStore initialized with the given box, defaulting to Hive.box(defaultBoxName)

N.B.: box must already be opened with either openBox, open, or initHiveForFlutter from graphql_flutter. This lets us decouple the async initialization logic, making store usage elsewhere much more straightforward.

Implementation

HiveStore([Box<Map<dynamic, dynamic>?>? box])
    : this.box = box ?? Hive.box<Map<dynamic, dynamic>?>(defaultBoxName);