My Flutter app is not generating .g.dart files

30 Views Asked by At

I am trying to generate g.dart file in app using "flutter pub run build_runner build" but no fill is created why i have no idea even file name is same also check dependences also.

this is the file which is not working

this is my api_services class

1

There are 1 best solutions below

0
Sreelal TS On

First, make sure you've installed build_runner package, if you haven't run the following command to install it to your dev dependencies:

dart pub add dev:build_runner

Now, run the following command to build .g.dart files. The following command runs for a single time and generates the builds.

dart run build_runner build

If anything goes wrong, please share more details.