flutter pub run build_runner watch —delete-conflicting-outputs

Run the generator 
Use the [watch] flag to watch the files' system for edits and rebuild as necessary.

=> flutter packages pub run build_runner watch  
-----------------
if you want the generator to run one time and exits use

=> flutter packages pub run build_runner build

if there's problem
=>flutter packages pub run build_runner clean