SignatureInterceptor class abstract

Steps into the built-in electronic signature flow at its two decision points, without replacing the signature UI itself.

Set it with controller.setSignatureInterceptor(...). Each hook receives a request and returns a response, immediately or after showing UI of your own. Nothing happens until the returned future completes. Both default implementations proceed unchanged, so override only what you need:

class BrandedSignatures extends SignatureInterceptor {
  @override
  Future<SignatureResponse> onSignatureRequested(SignatureRequest request) async {
    // Every signature starts with the thickness and opacity stored in the app.
    return SignatureResponse.proceed(
      style: SignatureStyle(thickness: prefs.thickness, opacity: prefs.opacity),
    );
  }
}

controller.setSignatureInterceptor(BrandedSignatures());

Supported on Android and iOS. A request is tied to the flow that issued it: a response that arrives after the view was disposed, or after a newer request replaced it, is ignored and that signing flow is abandoned.

Constructors

SignatureInterceptor()
const

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
onSignaturePlacementRequested(SignaturePlacementProposal proposal) → Future<SignaturePlacementResponse>
Called once a signature has been created or picked, before it is added to the document.
onSignatureRequested(SignatureRequest request) → Future<SignatureResponse>
Called before the signature creation UI is shown, both from the annotation toolbar and when a signature form field is tapped.
toString() → String
A string representation of this object.
inherited

Operators

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