Issue
I used the json serialization dependency but unfortunately the g.dart files are not getting genereated. I tried some of suggestions from stack but nothing worked.When I ran flutter pub run build_runner build ,android studio terminal showed this error : 'flutter' is not recognized as an internal or external command,operable program or batch file. Then I tried to add the flutter to environment variable but that also didn't work.
Solution
In all the stackoverflow solutions they are saying to add flutter sdk path to variable .I tried adding it in the studio File>Settings>Tools>Terminal>Environment variables, but this didn't work. Then I tried to add the flutter sdk path to system variables from Control Panel\System and Security\System -> Advanced system settings from the menu on the right.
Click the edit options and add the flutter sdk path
Add new variable path, in my case it was C:\Users\abr\documents\flutter\bin
Answered By - Abraham Mathew
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.