flutter_device_preview
flutter_device_preview copied to clipboard
Freezed 2.0 support
Freezed 2.0 was released yesterday: https://pub.dev/packages/freezed/changelog#200
After upgrading during pub get
I receive the following error:
Because device_preview 1.0.0 depends on freezed_annotation ^1.0.0 and no versions of device_preview match >1.0.0 <2.0.0, device_preview ^1.0.0 requires freezed_annotation ^1.0.0.
What's more, a simple dependency override is not enough this time, probably because the new freezed does not export collection/collection.dart
anymore:
/flutter-pub-cache/hosted/pub.dartlang.org/device_preview-1.0.0/lib/src/views/tool_panel/sections/subsections/device_model.dart:125:9: Error: The method 'groupBy' isn't defined for the class '_PlatformModelPicker'.
- '_PlatformModelPicker' is from 'package:device_preview/src/views/tool_panel/sections/subsections/device_model.dart' ('/flutter-pub-cache/hosted/pub.dartlang.org/device_preview-1.0.0/lib/src/views/tool_panel/sections/subsections/device_model.dart').
Try correcting the name to the name of an existing method, or defining a method named 'groupBy'.
groupBy<DeviceInfo, DeviceType>(devices, (d) => d.identifier.type);
^^^^^^^