Generate hive_product.g.dart file You can generate hive_product.g.dart file by running: dart run build_runner build This generating process is needed before running the program for the first time.