|
|
|
|
@ -19,7 +19,8 @@ class ESignature extends StatefulWidget {
|
|
|
|
|
final bool showShadow;
|
|
|
|
|
final String title;
|
|
|
|
|
|
|
|
|
|
const ESignature({Key? key, required this.title, required this.oldSignature, this.backgroundColor, this.onSaved, this.onChange, this.showShadow=true, required this.newSignature}) : super(key: key);
|
|
|
|
|
const ESignature({Key? key, required this.title, required this.oldSignature, this.backgroundColor, this.onSaved, this.onChange, this.showShadow = true, required this.newSignature})
|
|
|
|
|
: super(key: key);
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
State<ESignature> createState() => _ESignatureState();
|
|
|
|
|
@ -89,7 +90,7 @@ class _ESignatureState extends State<ESignature> {
|
|
|
|
|
.onPress(() async {
|
|
|
|
|
if (_editable) {
|
|
|
|
|
signature = await _controller!.toPngBytes();
|
|
|
|
|
if (widget.onChange != null) {
|
|
|
|
|
if (widget.onChange != null && signature != null) {
|
|
|
|
|
widget.onChange!(signature!);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|