I am getting the below error when using the forEach loop for the items when used in the function when returning the values.
bool validatedValues(List<String> values){
values.forEach((i){
if (i.length > 3){
return true;
}
});
return false;
}
Im using dart null safety sdk version: ">=2.12.0 <3.0.0"
Complete error:
The return type 'bool' isn't a 'void', as required by the closure's context.dartreturn_of_invalid_type_from_closure