HiveError: Box has already been closed.
Opened this issue · 0 comments
salahamassi commented
This Exception sometimes show after launching the app
=================================================================================================
[VERBOSE-2:ui_dart_state.cc(209)] Unhandled Exception: HiveError: Box has already been closed.
#0 BoxBaseImpl.checkOpen (package:hive/src/box/box_base_impl.dart:76:7)
#1 BoxImpl._writeFrames (package:hive/src/box/box_impl.dart:83:5)
#2 BoxImpl.putAll (package:hive/src/box/box_impl.dart:67:12)
#3 BoxBaseImpl.addAll (package:hive/src/box/box_base_impl.dart:122:11)
#4 HomeLocalDataSource.insertProducts (package:thepos/features/home/data/datasources/home_local_data_source.dart:21:24)
#5 HomeRepository.getProducts (package:thepos/features/home/data/repositories/home_repository.dart:28:23)
<asynchronous suspension>
#6 HomeController.getProduct (package:thepos/features/home/presentation/controllers/home_controller.dart:59:31)
<asynchronous suspension>