ProtectedWidget class

Per-widget protection helper for sensitive UI components.

This widget can blur content after a screenshot event and while recording.

Inheritance

Constructors

ProtectedWidget({Key? key, required Widget child, bool enabled = true, bool blurOnRecording = true, Duration blurOnScreenshotFor = const Duration(milliseconds: 1200), double blurSigma = 8, Widget? placeholder})
Creates a protected wrapper around child.
const

Properties

blurOnRecording bool
Whether to blur while a recording session is active.
final
blurOnScreenshotFor Duration
How long to blur after a screenshot event is detected.
final
blurSigma double
Blur intensity applied on both axes.
final
child Widget
The content that may be blurred for protection.
final
enabled bool
Whether protection behavior is enabled for this widget.
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
placeholder Widget?
Optional overlay displayed while blur is active.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<ProtectedWidget>
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited