Read page state index
Future<int?> readPageStateIndex() async { Box<int> pageStateBox = await Hive.openBox(boxName); return pageStateBox.get(key, defaultValue: 1); }