updatePageStateIndex method
Update page state index
Implementation
Future<void> updatePageStateIndex(int pageIndex) async {
Box<int> pageStateBox = await Hive.openBox(boxName);
if (pageStateBox.isNotEmpty) await pageStateBox.put(key, pageIndex);
}