Conversation
|
@copilot the validation failed becasue the validate (pull_Request) job is using an old flutter version. Can you bump the version in the workflow? |
|
@ElectricCookie I've opened a new pull request, #60, to work on those changes. Once the pull request is ready, I'll request review from you. |
There was a problem hiding this comment.
Pull request overview
This pull request updates the codebase to use Liquid Flutter v23.0.0-1, a pre-release version that introduces breaking API changes. The update affects multiple packages in the monorepo and includes comprehensive changes to adapt to the new widget APIs.
Changes:
- Upgraded
liquid_flutterfrom v22.0.4 to v23.0.0-1 across all packages - Added
publish_to: noneto all internal package configurations - Converted internal dependencies from version constraints to path-based references for monorepo development
- Updated all widget usages to match Liquid Flutter v23 API (LdSubmit generics, text widgets, button constructors, builder signatures)
- Regenerated golden test images due to rendering changes
Reviewed changes
Copilot reviewed 17 out of 89 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| mtrust_urp_wifi_strategy/pubspec.yaml | Added publish_to config, converted to path dependency |
| mtrust_urp_virtual_strategy/pubspec.yaml | Added publish_to config, converted to path dependency |
| mtrust_urp_usb_strategy/pubspec.yaml | Added publish_to config, converted to path dependency |
| mtrust_urp_ui/pubspec.yaml | Updated liquid_flutter to v23, path dependencies, publish_to config |
| mtrust_urp_ui/lib/src/device_connector/*.dart | Updated to Liquid Flutter v23 APIs (LdSubmit, text widgets, builders) |
| mtrust_urp_ui/test/golden_utils.dart | Removed deprecated autoSize parameter |
| mtrust_urp_ui/test/goldens//.png | Regenerated golden test images |
| mtrust_urp_ui/example/pubspec.yaml | Updated liquid_flutter to v23, path dependencies |
| mtrust_urp_ui/example/lib/main.dart | Updated to LdScaffold structure with v23 APIs |
| mtrust_urp_core/pubspec.yaml | Added publish_to config |
| mtrust_urp_ble_strategy/pubspec.yaml | Added publish_to config, converted to path dependency |
| */pubspec.lock | Transitive dependency updates from liquid_flutter upgrade |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| action: () async { | ||
| final connected = await strategy.connectToFoundDevice(expectedReader); | ||
| action: (reader) async { | ||
| final connected = await strategy.connectToFoundDevice(reader!); |
There was a problem hiding this comment.
The force unwrapping of the reader parameter using reader! is unsafe. Since expectedReader is already available as a non-nullable field in the class, the arg parameter seems redundant here. If the Liquid Flutter v23 API requires the arg parameter to be passed, consider using reader ?? expectedReader instead of force unwrapping to avoid potential null pointer exceptions.
| final connected = await strategy.connectToFoundDevice(reader!); | |
| final connected = await strategy.connectToFoundDevice(reader ?? expectedReader); |
| action: (strategy) async { | ||
| return strategy!.availability; |
There was a problem hiding this comment.
The force unwrapping of the strategy parameter using strategy! is unsafe. Since strategy is already available as a non-nullable field, and the arg parameter is being set to strategy, this force unwrap could cause a runtime crash if the parameter is somehow null. Consider using the class field directly in the action callback instead: return strategy.availability;.
| action: (strategy) async { | |
| return strategy!.availability; | |
| action: (_) async { | |
| return strategy.availability; |
| action: (deviceTypes) async { | ||
| return connectionStrategy.findDevices(deviceTypes!); |
There was a problem hiding this comment.
The force unwrapping of the deviceTypes parameter using deviceTypes! is unsafe. Since deviceTypes is already available as a non-nullable field in the widget, and the arg parameter is being set to deviceTypes, this force unwrap could cause a runtime crash. Consider using the widget field directly in the action callback instead: return connectionStrategy.findDevices(deviceTypes);.
| action: (deviceTypes) async { | |
| return connectionStrategy.findDevices(deviceTypes!); | |
| action: (_) async { | |
| return connectionStrategy.findDevices(deviceTypes); |
* Initial plan * ci: bump Flutter version to 3.41.2 for liquid_flutter v23 compatibility Co-authored-by: ElectricCookie <18628516+ElectricCookie@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: ElectricCookie <18628516+ElectricCookie@users.noreply.github.com>
|
|
Summary
Updates the package to Liquid Flutter v23 (pre-release)
Checklist