You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So if I have a freezed and/or json serialized class A in a.dart file, I have to add part 'a.freezed.dart and/or a.g.dart to the head of the files. In such files (a.dart) this extension does not fix the import statement.
I had only the parted files not fixing imports so I thought this was the root of the problem, when I tried to reproduce this in an empty project I did not have this problem.
So I want back to my main project and tried making a package import in another files and some of them actually did not fix their imports.
I also though that this had to do with the depth of the files, so again I tried to reproduce that in the empty project, still worked like a charm.
At this point I have no idea what's causing this in my main project, I'll come back when I have more clues.
Figured it out, apparently this extension will not work when you have a comment above the import statements. In my case, I had an 'ignore for file' (e.g. // ignore_for_file: constant_identifier_names) statement.
Hey there,
In my app I am using
json_serializable
andfreezed
.So if I have a freezed and/or json serialized class
A
ina.dart
file, I have to addpart 'a.freezed.dart
and/ora.g.dart
to the head of the files. In such files (a.dart
) this extension does not fix the import statement.a.dart
:The text was updated successfully, but these errors were encountered: