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