SignaturePreview constructor
SignaturePreview({
- Key? key,
- void onSignCapture()?,
- bool autoClearOnDone = false,
- bool autoClearOnCancel = true,
- Color screenColor = Colors.white,
- Color signColor = primaryColor,
- double signStrokeWidth = 2,
- double signCapturePixelRatio = 1.0,
- bool enableTouchSign = false,
- bool enableSignGuide = false,
- bool enableActionButtons = true,
- double aspectRatio = DEVICE_ASPECT_RATIO,
A Widget that captures Signature with Scriptel Signature Pad device or touch
Implementation
SignaturePreview({
Key? key,
this.onSignCapture,
this.autoClearOnDone = false,
this.autoClearOnCancel = true,
this.screenColor = Colors.white,
this.signColor = primaryColor,
this.signStrokeWidth = 2,
this.signCapturePixelRatio = 1.0,
this.enableTouchSign = false,
this.enableSignGuide = false,
this.enableActionButtons = true,
this.aspectRatio = DEVICE_ASPECT_RATIO,
}) : super(key: key) {
_focusNode.addListener(() => _isFocused.value = _focusNode.hasFocus);
_plugin.setListener(
onSignCoordinate: _registerSignCoordinate,
onSignCancel: _registerSignCancel,
onSignEnd: _registerSignComplete,
onSignStart: _registerNewSignStart,
onNewStroke: _registerNewStroke,
onSignMeta: (model, version, protocolVersion) {},
);
}