flutter / flutter/flutter

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

Open
#177,054 7 comments 1 reaction 0 assignees View on GitHub
c: new feature c: proposal framework P2 platform-android platform-ios team-framework triaged-framework
Dominant language
Dart
Stars
179k
Forks
31.1k
PR merge metrics
PR metrics pending

Description

> 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 like`SensitiveContent.addHandler(<>)`, or local `SensitiveContent(handler: <>, child: ...)` or configure additional parent widget `SensitiveContentHandlers(handlers)`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.