More fixes to prev commit

This commit is contained in:
Imran Remtulla
2022-12-19 19:58:12 -05:00
parent afc8e41171
commit 0c2654a226
6 changed files with 38 additions and 44 deletions

View File

@@ -141,8 +141,9 @@ List<String> getLinksFromParsedHTML(
.map((e) => '$prependToLinks${e.attributes['href']!}')
.toList();
getDefaultValuesFromFormItems(List<List<GeneratedFormItem>> items) {
Map.fromEntries(items
Map<String, String> getDefaultValuesFromFormItems(
List<List<GeneratedFormItem>> items) {
return Map.fromEntries(items
.map((row) => row.map((el) => MapEntry(el.key, el.defaultValue ?? '')))
.reduce((value, element) => [...value, ...element]));
}