Hides the app from screenshots and screen recordings (banking, OTP, paid videos). Android, iOS, macOS, Windows; Linux/web do nothing. UScreenGuard.enable()
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
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- isEnabled → bool
-
True while protection is on.
no setter
- onScreenRecording ↔ void Function(bool active)?
-
Runs with true/false when screen recording starts/stops (iOS only).
UScreenGuard.onScreenRecording = (on) => pauseVideo()getter/setter pair - onScreenshot ↔ void Function()?
-
Runs when the user takes a screenshot (iOS only).
UScreenGuard.onScreenshot = () => UToast.warning(message: "Screenshots are not allowed")getter/setter pair
Static Methods
-
disable(
) → Future< void> -
Allows screenshots and recordings again.
await UScreenGuard.disable() -
enable(
) → Future< void> -
Blocks screenshots and recordings (Android/Windows/macOS: captured black; iOS: hidden in recordings/screenshots).
await UScreenGuard.enable() -
set(
{required bool enabled}) → Future< void> -
Turns protection on or off.
UScreenGuard.set(enabled: isSensitivePage)