WIP
This commit is contained in:
parent
561a128943
commit
03bd747050
|
@ -74,20 +74,23 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
}
|
}
|
||||||
|
|
||||||
bool _isFormValid(BuildContext context) {
|
bool _isFormValid(BuildContext context) {
|
||||||
|
|
||||||
if (_model.uploadedLocalFile.bytes?.isEmpty ?? true) {
|
if (_model.uploadedLocalFile.bytes?.isEmpty ?? true) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_model.textController1.text.isEmpty || _model.textController1.text == '') {
|
if (_model.textController1.text.isEmpty ||
|
||||||
|
_model.textController1.text == '') {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_model.dropDownValue == null || _model.dropDownValue!.isEmpty || _model.dropDownValue == '') {
|
if (_model.dropDownValue == null ||
|
||||||
|
_model.dropDownValue!.isEmpty ||
|
||||||
|
_model.dropDownValue == '') {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_model.textController2.text.isEmpty || _model.textController2.text == '') {
|
if (_model.textController2.text.isEmpty ||
|
||||||
|
_model.textController2.text == '') {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -244,11 +247,12 @@ class _RegisiterVistorTemplateComponentWidgetState
|
||||||
} else if (snapshot.hasError ||
|
} else if (snapshot.hasError ||
|
||||||
snapshot.data == null ||
|
snapshot.data == null ||
|
||||||
snapshot.data == '') {
|
snapshot.data == '') {
|
||||||
|
safeSetState(() => _isVisitorRegistered = false);
|
||||||
_isVisitorRegistered = false;
|
_isVisitorRegistered = false;
|
||||||
visitorAlreadyRegistered.add(true);
|
visitorAlreadyRegistered.add(true);
|
||||||
return const SizedBox();
|
return const SizedBox();
|
||||||
} else {
|
} else {
|
||||||
_isVisitorRegistered = true;
|
safeSetState(() => _isVisitorRegistered = true);
|
||||||
visitorAlreadyRegistered.add(false);
|
visitorAlreadyRegistered.add(false);
|
||||||
return _model.textController2.text.isEmpty
|
return _model.textController2.text.isEmpty
|
||||||
? const SizedBox()
|
? const SizedBox()
|
||||||
|
|
Loading…
Reference in New Issue