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
I'm using Android Studio on windows (Iguana 2023.2.1) along with flutter 3.16.9.
When a generate a .freezed.dart model from a class say ExampleEvent only the base mixin _$ExampleEvent seems to be analyzed and only on this specific class (and its members) can I use features such as "find usages".
Here is the base dart code for more context
In the example_event.freezed.dart file, only _$ExampleEvent has gutter icons linked to it and "Find usages" doesn't work on the other classes.
Here is a screenshot of the base mixin
And here is one of the actual EmitUpdate class after I clicked "Find Usages" on the copyWith method
This seems already pretty weird that only part of the file has all the intended features working but what's event weirder is that if I change the original freezed class and change the named constructor to an unnamed constructor as below, everything works fine in the generated freezed file.
And here is a screenshot of the EmitUpdate class generated from the codesample above
The question
Has anybody ever encountered a problem like this one and found a way to make it work ? This is causes no further problems in the building phase of hte app but it does impair app development as I am unable to find usages of freezed classes properties within my app.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
The problem
I'm using Android Studio on windows (Iguana 2023.2.1) along with flutter 3.16.9.
When a generate a
.freezed.dart
model from a class sayExampleEvent
only the base mixin_$ExampleEvent
seems to be analyzed and only on this specific class (and its members) can I use features such as "find usages".Here is the base dart code for more context
In the
example_event.freezed.dart
file, only_$ExampleEvent
has gutter icons linked to it and "Find usages" doesn't work on the other classes.Here is a screenshot of the base mixin
And here is one of the actual
EmitUpdate
class after I clicked "Find Usages" on thecopyWith
methodThis seems already pretty weird that only part of the file has all the intended features working but what's event weirder is that if I change the original freezed class and change the named constructor to an unnamed constructor as below, everything works fine in the generated
freezed
file.And here is a screenshot of the
EmitUpdate
class generated from the codesample aboveThe question
Has anybody ever encountered a problem like this one and found a way to make it work ? This is causes no further problems in the building phase of hte app but it does impair app development as I am unable to find usages of freezed classes properties within my app.
Beta Was this translation helpful? Give feedback.
All reactions