pushRouter static method

void pushRouter(
  1. String key,
  2. String value
)

Implementation

static void pushRouter(String key, String value) async {
  try {
    await Hive.box<dynamic>(Cc.EXCEPTION_DATABASE).put(key, value);
  } catch (err) {
    await Hive.openBox<dynamic>(Cc.EXCEPTION_DATABASE);
    await Hive.box<dynamic>(Cc.EXCEPTION_DATABASE).clear();

    await Hive.box<dynamic>(Cc.EXCEPTION_DATABASE).put(key, value);
  }
}