CloudFlareTurnstile class

CloudFlareTurnstile

Inheritance

Constructors

CloudFlareTurnstile.new({Key? key, required String siteKey, String? action, String? cData, String baseUrl = 'http://localhost/', TurnstileOptions? options, TurnstileController? controller, OnTokenReceived? onTokenReceived, OnTokenExpired? onTokenExpired, VoidCallback? onWidgetReady, VoidCallback? onWidgetBeforeInteractive, VoidCallback? onWidgetAfterInteractive, OnError? onError})

Properties

action String?
action 参数同上,具体含义查询JS Turnstile 文档
final
baseUrl String
A base url of turnstile Site,基础URL
final
cData String?
A customer payload that can be used to attach customer data to the challenge throughout its issuance and which is returned upon validation. This can only contain up to 255 alphanumeric characters including _ and -. 同上
final
controller TurnstileController?
A controller for an Turnstile widget 控制器用于控制view做操作
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onError OnError?
错误的回调,同上
final
onTokenExpired OnTokenExpired?
token 过期的回调,同上
final
onTokenReceived OnTokenReceived?
token接收到的回调代码块,外部传入,内部接收到回调后执行此回调通知外部
final
onWidgetAfterInteractive VoidCallback?
这里是我们多加的一个回调事件,AfterInteractive
final
onWidgetBeforeInteractive VoidCallback?
这里是我们多加的一个回调事件,BeforeInteractive
final
onWidgetReady VoidCallback?
这里是我们多加的一个回调事件,用户widget ready
final
options TurnstileOptions
A Turnstile widget options 参数配置类,类中又区分了不少东西
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
siteKey String
siteKey 参数用于传递给html data中的Js代码
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<CloudFlareTurnstile>
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