Replies: 1 comment 2 replies
-
BlocBuilder<DevicesBloc, DevicesState>(
builder: (context, devicesState) {
return switch (devicesState) {
- DevicesState.success(:final devices) => ListView.builder(
+ _Success(:final devices) => ListView.builder(
itemCount: devices.length,
itemBuilder: (context, index) {
final device = devices[index];
return Text(device.name);
},
),
}; |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
https://github.com/rrousselGit/freezed/blob/master/packages/freezed/migration_guide.md
I am attempting to migrate my Dart code to utilize version 3's pattern matching features, specifically replacing the map and when methods generated by the freezed package. My current state is defined using freezed as follows:
During the migration, I encountered the following error:
This error occurs in the following context:
Beta Was this translation helpful? Give feedback.
All reactions