5

when I am trying to generate the routes for my app using flutter pub run build_runner build

I'm getting an error and the generated class can't be generated I only see [dynamic] is not a class in the generated class

2 Answers2

6

try to clean and rebuild it ,It worked for me.

flutter packages pub run build_runner clean

then

flutter packages pub run build_runner build

Mohamed Sakr
  • 126
  • 4
0

According to the documentation:

Make sure you always Save your files before running the generator, if that doesn't work you can always try to clean and rebuild.

Then:

flutter packages pub run build_runner clean
dippas
  • 58,591
  • 15
  • 114
  • 126
vstram
  • 11
  • 3