Skip to content

Commit a1b2122

Browse files
committed
Fix bytes != null assertion on signature pad when initialValue is empty
1 parent 5289086 commit a1b2122

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

lib/src/fields/form_builder_signature_pad.dart

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,12 @@ class FormBuilderSignaturePad extends FormBuilderField<Uint8List> {
7878
width: width,
7979
decoration: BoxDecoration(
8080
border: border,
81-
image: (state.enabled &&
82-
(null != initialValue &&
83-
initialValue != state.value))
84-
? null
85-
: DecorationImage(
86-
image: MemoryImage(state.value),
87-
),
81+
image:
82+
(null != initialValue && initialValue == state.value)
83+
? DecorationImage(
84+
image: MemoryImage(state.value),
85+
)
86+
: null,
8887
),
8988
child: state.enabled
9089
? GestureDetector(

0 commit comments

Comments
 (0)