stuck on creating 'moor_database.g.dart'

Issue

I wanted to generate file ‘moor_database.g.dart’ by typing the command ‘flutter packages pub run build_runner watch’ but after doing some procedures it just tells: [INFO] Succeeded after 9.0s with 0 outputs (4 actions)

And inside the terminal results I saw this warning:
[WARNING] moor_generator:moor_generator on lib/data/moor.dart: Missing “part ‘moor.g.dart’;”.

Solution

I had this message because I had my own file called moor.dart which conflicted with the moor library file (that’s why that command was not working properly) but Android Studio didn’t give any direct errors or warning on that, after renaming my file name, everything worked

Answered By – SardorbekR

Answer Checked By – Senaida (FlutterFixes Volunteer)

Leave a Reply

Your email address will not be published. Required fields are marked *