MethodChannelSecurity class
Single method channel bridge to native Android/iOS code.
All calls use the feature#action naming convention, e.g.
root#isDeviceRooted, screenshot#enable.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
biometricAuthenticate(
{required String reason, required bool allowDeviceCredential, String? cancelLabel}) → Future< bool> -
Returns
trueon success andfalsewhen the user cancelled. Throws a PlatformException for every other failure. -
biometricAvailability(
) → Future< Map< String, dynamic> > -
Returns a map:
{'available': bool, 'type': String, 'reason': String?}. -
denyDebuggerAttachment(
) → Future< bool> -
Returns
truewhen debugger attachment is (now) denied for the process. -
disableScreenshotProtection(
) → Future< void> -
enableScreenshotProtection(
) → Future< void> -
getSignatureHash(
) → Future< String?> -
hasInjectedLibraries(
) → Future< bool> -
isAppIntegrityValid(
) → Future< bool> -
isDebuggerAttached(
) → Future< bool> -
isDeviceRooted(
) → Future< bool> -
isEmulator(
) → Future< bool> -
isRuntimeHooked(
) → Future< bool> -
isScreenBeingRecorded(
) → Future< bool> -
isScreenCaptured(
) → Future< bool> -
isTampered(
) → Future< bool> -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pasteboardClear(
{bool onlyIfOwned = false}) → Future< bool> -
Clears the clipboard. When
onlyIfOwnedistruethe clipboard is only cleared if it still holds the value last written by this plugin. Returnstruewhen the clipboard was cleared. -
pasteboardCopy(
{required String value, required int expiresAfterMs}) → Future< void> -
screenCaptureEvents(
) → Stream -
Raw native screen-capture events. Each event is a map such as
{'type': 'captureChanged', 'isCaptured': true}or{'type': 'screenshot'}. -
secureStorageDelete(
{required String key}) → Future< void> -
secureStorageDeleteAll(
) → Future< void> -
secureStorageRead(
{required String key}) → Future< String?> -
secureStorageWrite(
{required String key, required String value}) → Future< void> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- channel → MethodChannel
-
Visible for testing – allows injection of a mock channel.
no setter
- screenCaptureEventChannel → EventChannel
-
Visible for testing – the screen-capture event channel.
no setter