-
-
Notifications
You must be signed in to change notification settings - Fork 962
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
fix(device_info_plus): Ensure use of Activity Context to obtain WindowManager #2688
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.
Nice one
Hey folks thanks for the quick response on #2687 but based on some feedback from Flutter apps built within Google there has been some pushback on this fix. I'll file a new issue but here is some of the raw feedback:
|
Hmm since this hasn't been incorporated into a release yet, maybe it doesn't make sense to file a new issue. So, I'll just keep the conversation here for now. Here are my thoughts: A. Does it even make sense to offer display metrics as part of B. |
Hi Christian, I am more in favor of getting rid of Display Metrics, indeed. What I'll do is to revert this PR (partially) and re-open the original ticket. Then, we will have to make a breaking change, removing the Display Metrics part. edit: Actually, I will just do it in one single PR |
Thanks folks! I second everything Christian mentioned, it doesn't make sense to include the display metrics info in the DeviceInfo plugin on Android. |
Description
WindowManager
is obtained from theActivity Context
instead ofApplication Context
ActivityAware
to obtainActivity
binding inDeviceInfoPlusPlugin
class.onDetachedFromEngine
method).Activity Context
use is correct.Related Issues
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).