Added cache configuration and changed added client validation

This commit is contained in:
Juan Gilsanz Polo 2023-12-18 02:30:32 +01:00
parent 569ab7d569
commit 313b76740a
11 changed files with 302 additions and 167 deletions

View file

@ -74,22 +74,6 @@ void openSafeSearchModal({
);
}
bool checkValidValues({
required TextEditingController nameController,
required List<ControllerListItem> identifiersControllers
}) {
if (
nameController.text != '' &&
identifiersControllers.isNotEmpty &&
identifiersControllers[0].controller.text != ''
) {
return true;
}
else {
return false;
}
}
void openClientFormModal({
required BuildContext context,
required double width,
@ -123,4 +107,10 @@ void openClientFormModal({
onDelete: onDelete,
),
);
}
bool validateNumber(String value) {
if (value == "") return true;
final regexp = RegExp(r'^\d+$');
return regexp.hasMatch(value);
}