I was also facing this problem. So adding the below line to dependencies NOT to dev_dependencies will surely avoid the issue.
hive_generator: ^2.0.1