Skip to content

SensitiveContent should support ways to hook custom handlers for lower Android versions or iOS subsystems #177054

@matasb-google

Description

@matasb-google

To reword/clarify feature request:

Would be great to be able to use single/same API across app (SensitiveContent) to hook-up custom protections (for example iOS, old Android versions screen protections, screen recording detections, etc). Not requesting to implement or provide those protections, just to open up API to be able to provide custom "hooks".

Use case

While SensitiveContent seems to be great and intuitive API, it does not allow to expand it to older Android versions and/or iOS. So multiple overlapping security features are required.

It would be great to have some way to bind/hook custom code to enable protections (like FLAG_SECURE, or tapjacking, etc) which are not specific to Android 35+.

Context: https://docs.flutter.dev/platform-integration/android/sensitive-content

Proposal

Allowing to pass either global registration likeSensitiveContent.addHandler(<>), or local SensitiveContent(handler: <>, child: ...) or configure additional parent widget SensitiveContentHandlers(handlers)

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listc: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Flutterframeworkflutter/packages/flutter repository. See also f: labels.platform-androidAndroid applications specificallyplatform-iosiOS applications specificallyteam-frameworkOwned by Framework teamtriaged-frameworkTriaged by Framework team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions