Mindinventory / flutter-retrofit

API calls using the retrofit client.
https://www.mindinventory.com/flutter-app-development.php
MIT License
51 stars 21 forks source link

Can't regenerate ".g.dart" files after modifications #3

Closed Gobmichet closed 3 years ago

Gobmichet commented 3 years ago

Hi, I downloaded your code in order to manipulate a bit Retrofit before integrating it in my Flutter project...

The app launches and work but when i create Post entity for exemple and a method @GET("/posts") Future<List> getPosts(); in the ApiClient, i have to "rebuild" the .g.dart files

I tried :

1 - it never finishes ! (more 45sec last time before i killed it) 2 - i have wierd stuff like :: Bad state: Unexpected diagnostics: C:\src\flutter\flutter\bin\cache\pkg\sky_engine\lib\ui\channel_buffers.dart:166:25 - This requires the 'non-nullable' language feature to be enabled. C:\src\flutter\flutter\bin\cache\pkg\sky_engine\lib\ui\channel_buffers.dart:30:49 - This requires the 'non-nullable' language feature to be enabled. C:\src\flutter\flutter\bin\cache\pkg\sky_engine\lib\ui\channel_buffers.dart:390:19 - This requires the 'non-nullable' language feature to be enabled. etc...

Can you please tell me what to do in order to fix that and so i can add "Post" and "Comment" class to your application please ?

Thanks in advance :)

Gobmichet commented 3 years ago

Well, i simply ::

Then i could regenerate .g.dart files with the appropriate command So i'm closing the issue with my own answer ^^