-
-
Notifications
You must be signed in to change notification settings - Fork 996
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(device_info_plus): LinuxDeviceInfo toString method #2652
feat(device_info_plus): LinuxDeviceInfo toString method #2652
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution, and including a test as well!
I'd prefer if the long string could be split into several lines or a multiline string, as it will be easier to extend and review changes in the future.
Can you take a look at the Flutter analyze issues as well?
packages/device_info_plus/device_info_plus/lib/src/model/linux_device_info.dart
Show resolved
Hide resolved
The method was generated by dart-data-class-generator and uses a standard format. How would you like it to be multi-line? Code of the form return '''LinuxDeviceInfo(
name: $name,
version: $version,
id: $id,
idLike: $idLike,
versionCodename: $versionCodename,
versionId: $versionId,
prettyName: $prettyName,
buildId: $buildId,
variant: $variant,
variantId: $variantId,
machineId: $machineId
)'''; would return a multi-line string, not a single line as expected in String toString() => 'LinuxDeviceInfo(${data.toString().replaceAll('}', '').replaceAll('{', '')})';
Done. |
09b2896
to
d7520d0
Compare
That's right, I was thinking on a different approach, but since we already do similar plus_plugins/packages/package_info_plus/package_info_plus/lib/package_info_plus.dart Line 119 in c943583
|
@miquelbeltran Seems the pipeline needs to be re-run, android integration test is failing & I cannot manually re-run. Probably a flaky issue as PR does not touch any android code. |
That's fine, no worries, the |
Description
Adds
toString
forLinuxDeviceInfo
. This is useful when debugging apps on Linux distros.Related Issues
N/A
Checklist
CHANGELOG.md
nor the plugin version inpubspec.yaml
files.flutter analyze
) does not report any problems on my PR.Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?
!
in the title as explained in Conventional Commits).