listBool method
get value as bool
if required
argument is true then all the list is not null
Implementation
List<bool?>? listBool(String i, [bool required = false]) {
final data = formFields[i];
if (data == null) {
throw HTTPException(422, 'field $i is required');
}
return data.map((e) {
bool? i2 = e.toBool();
if (i2 == null && required) {
throw HTTPException(422, 'field $i is not a list of booleans');
}
return i2;
}).toList();
}