SecureInput class

安全输入封装类,提供对用户输入行为的强化保护能力。

本类主要用于在应用中快速接入安全输入策略,包括:

  • SQL 注入特征检测(基于关键词、模式)
  • 屏幕截图与录屏防护(可选)
  • 输入框焦点管理(点击非输入区域自动取消焦点)

支持将普通的 TextField 转换为具备验证能力的 TextFormField, 同时注入自动防注入校验器、截图保护行为等安全逻辑。

Constructors

SecureInput.new()

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

allowScreenshot() Future<void>
关闭屏幕截图与录屏防护,恢复为默认状态。
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
wrapTextField(TextField field, {String? validator(String?)?, String? messageForViolation = "检测到非法操作,请停止尝试注入攻击!", bool? preventScreenshot = true}) Widget
包装并返回一个安全版本的输入框组件。

Operators

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