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

[screen_state] iOS support and renewal of the native example apps #901

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

luansilva-tokenlab
Copy link

I introduced iOS support to the 'screen_state' package by leveraging the 'isProtectedDataAvailable' and 'brightness' parameters for screen state analysis. Additionally, I refined the base plugin to facilitate its utilization in iOS applications, and optimized code readability and data handling with enhanced enums.

Moreover, I updated the native example apps using Flutter 3.16.9 as the foundation, addressing their outdated status and ensuring compatibility with iOS.

Despite these advancements, I encountered limitations inherent to the iOS platform. Notably, the 'isProtectedDataAvailable' parameter only provides data if the user has any form of password protection enabled, rendering it ineffective for detecting unlocks on devices without a password. Furthermore, the iOS simulator's inability to replicate device locking behavior and its distinct brightness controls hampered event detection within the simulator environment.

Throughout development, I conducted testing on an iPhone 6+ running iOS 12.5.7, successfully capturing all relevant events.

@luansilva-tokenlab
Copy link
Author

#169

@bardram
Copy link
Contributor

bardram commented Mar 8, 2024

This looks indeed interesting. I will take a look later.

@bardram bardram self-requested a review March 8, 2024 16:39
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.

None yet

2 participants