Skip to content

A Flutter plugin to manage Android's FLAG_SECURE at runtime

License

Notifications You must be signed in to change notification settings

maelchiotti/flag_secure

Repository files navigation

flag_secure

Pub Version

A Flutter plugin to manage Android's FLAG_SECURE at runtime.

Installing

See the installing instructions.

Usage

  • Get whether FLAG_SECURE is set:

    try {
      final bool? isSet = await FlagSecure.isSet;
    } on PlatformException {
      // Handle exception
    }
  • Set FLAG_SECURE:

    try {
      await FlagSecure.set();
    } on PlatformException {
      // Handle exception
    }
  • Unset FLAG_SECURE:

    try {
      await FlagSecure.unset();
    } on PlatformException {
      // Handle exception
    }

Example

See the example app.