NoScreenshotWeb class
Web implementation of NoScreenshotPlatform.
Browsers cannot truly prevent OS-level screenshots. This provides
best-effort JS deterrents: right-click blocking, PrintScreen
interception, user-select: none, and visibilitychange detection.
- Inheritance
-
- Object
- PlatformInterface
- NoScreenshotPlatform
- NoScreenshotWeb
Constructors
- NoScreenshotWeb.createForTest()
-
Creates an instance for testing without going through registerWith.
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
screenshotStream
→ Stream<
ScreenshotSnapshot> -
Stream to screenshot activities
ScreenshotSnapshotThis stream will emit aScreenshotSnapshotwhenever a screenshot is taken. TheScreenshotSnapshotcontains the path to the screenshot file. throwUnmimplementedErrorif not implementno setteroverride
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
screenshotOff(
) → Future< bool> -
Return
trueif screenshot capabilities has been successfully disabled or is currently disabled andfalseotherwise. throwUnmimplementedErrorif not implementoverride -
screenshotOn(
) → Future< bool> -
Return
trueif screenshot capabilities has been successfully enabled or is currently enabled andfalseotherwise. throwUnmimplementedErrorif not implementoverride -
screenshotWithBlur(
{double blurRadius = 30.0}) → Future< bool> -
Always enables blur overlay mode (idempotent — safe to call repeatedly).
override
-
screenshotWithColor(
{int color = 0xFF000000}) → Future< bool> -
Always enables color overlay mode (idempotent — safe to call repeatedly).
override
-
screenshotWithImage(
) → Future< bool> -
Always enables image overlay mode (idempotent — safe to call repeatedly).
override
-
startScreenRecordingListening(
) → Future< void> -
Start listening to screen recording activities
override
-
startScreenshotListening(
) → Future< void> -
override
-
stopScreenRecordingListening(
) → Future< void> -
Stop listening to screen recording activities
override
-
stopScreenshotListening(
) → Future< void> -
Stop listening to screenshot activities
override
-
toggleScreenshot(
) → Future< bool> -
Return
trueif screenshot capabilities has been successfully toggle from it previous state andfalseif the attempt to toggle failed. throwUnmimplementedErrorif not implementoverride -
toggleScreenshotWithBlur(
{double blurRadius = 30.0}) → Future< bool> -
override
-
toggleScreenshotWithColor(
{int color = 0xFF000000}) → Future< bool> -
override
-
toggleScreenshotWithImage(
) → Future< bool> -
Return
trueif screenshot capabilities has been successfully enabled or is currently enabled andfalseotherwise. throwUnmimplementedErrorif not implementoverride -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
registerWith(
Registrar registrar) → void