signature null values fix.

design_3.0_task_module_new
Sikander Saleem 5 months ago
parent 69d10c50de
commit 10dd969d71

@ -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!);
}
}

Loading…
Cancel
Save