iterateInRules method

dynamic iterateInRules(
  1. InspectionCase inspectionCase, {
  2. dynamic myCustomRule(
    1. String,
    2. InspectionCase inspectionCase
    )?,
})
inherited

Implementation

iterateInRules(InspectionCase inspectionCase,
    {Function(String, InspectionCase inspectionCase)? myCustomRule}) {
  for (var item in inspectionCase.rule) {
    var inspectionResponse =
        validation(inspectionCase, item, myCustomRule: myCustomRule!);
    if (inspectionResponse is String) if (inspectionResponse.length > 0)
      return inspectionResponse;
  }
}