A clipboard plugin that allows copy sensitive content to clipboard using the new param sensitive into the Android 13 (API 33).
For more information about it, read the original documentation.
This project is an anticipated plugin to avoid sensitive data be shown on Android 13, until Flutter's official package allows to do the same.
This works with Android and iOS. The main objective is to wrap the original clipboard, allowing to hide sensitive content only for Android 13. If the default platform is iOS, the original clipboard from Flutter will be called.
Because the Android 13 has a pop up dialog, showing the copied content, we need to avoid show feedback message on bottom of your page. For this, you can use the return of the copy method, to guarantee if the sensitive content was hidden for Android 13 and pop up was shown. If the method returns true, the platform is the Android 13, and the pop up shows up - and you should not show your message. If returns false, you can show your feedback message normally.
dependencies:
sensitive_clipboard: [latest version]
$ flutter pub get
import 'package:sensitive_clipboard/sensitive_clipboard.dart';
SensitiveClipboard.copy('Sensitive-Content');
Only for Android development:
Before you run, config your android/app/build.gradle file
android {
compileSdkVersion 33
This project is licensed under the MIT License - see the LICENSE file for details