rewrote check_required and did some map stuff. also fixed that typed in text in add place isnt saved
This commit is contained in:
12
lib/screens/sharedMethods/check_required.dart
Normal file
12
lib/screens/sharedMethods/check_required.dart
Normal file
@@ -0,0 +1,12 @@
|
||||
class CheckRequired {
|
||||
static bool checkRequired(Map<String, Map<String, dynamic>> fieldsList) {
|
||||
for (String key in fieldsList.keys) {
|
||||
if (fieldsList[key]!["required"]! && fieldsList[key]!["controller"]!.text.isEmpty) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user