Skip to content
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)!: migrate to package:web #2624

Merged
merged 7 commits into from
Mar 6, 2024

Conversation

miquelbeltran
Copy link
Member

@miquelbeltran miquelbeltran commented Feb 29, 2024

Description

  • Replace calls to dart:html by the equivalent with the package:web.
  • Tested on Chrome + macOS
  • Set web version to >=0.5.0 <=0.6.0 to be compatible with any upcoming web release.
  • Set min Dart sdk version to 3.3.0 in package, as it is the min version of web 0.5. This is required since Navigator is only available from version 0.5, so it is not possible to be compatible with older versions of web.
  • Note: The property deviceMemory seems to be missing in the current web implementation. The corresponding ticket has been created in the package:web repo: Navigator.deviceMemory is missing dart-lang/web#192 This property is nullable (int?) so it is not a blocker, however, users relying on this property will be affected. A solution is possible by creating our own deviceMemory extension.

Related Issues

Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I titled the PR using Conventional Commits.
  • I did not modify the CHANGELOG.md nor the plugin version in pubspec.yaml files.
  • All existing and new tests are passing.
  • The analyzer (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?

  • Yes, this is a breaking change (please indicate that with a ! in the title as explained in Conventional Commits).
  • No, this is not a breaking change.

@miquelbeltran miquelbeltran marked this pull request as ready for review March 2, 2024 14:11
@miquelbeltran miquelbeltran requested a review from vbuberen March 6, 2024 07:08
Copy link
Collaborator

@vbuberen vbuberen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

Based on recent discussions we had, I think we should go moving to Dart 3.3 as min for all plugins and align on web 0.5.0 as min version for consistency. Agree?

@miquelbeltran
Copy link
Member Author

Sounds good to me! I will merge this one now

@miquelbeltran miquelbeltran merged commit 154e76c into main Mar 6, 2024
18 of 19 checks passed
@miquelbeltran miquelbeltran deleted the miquelbeltran/issue2601 branch March 6, 2024 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Request]: (device_info_plus): migrate to pkg:web from dart:html
2 participants