formValues method

Map<String, Object?> formValues({
  1. List<String>? selectedFields,
})

Implementation

Map<String, Object?> formValues({List<String>? selectedFields}) {
  if (selectedFields != null && selectedFields.isNotEmpty) {
    var res = <String, Object?>{};
    for (var key in selectedFields) {
      res[key] = formResult[key]?.parsedValue;
    }
    return res;
  }
  return formResult.map((key, value) => MapEntry(key, value.parsedValue));
}