getAll method
Retrieves form data including fields and files
Returns a map with 'fields' and 'files' keys.
keys
in 'fields' contains form fields and their values.
trim
indicates whether to trim string values.
Implementation
Map<String, Object?> getAll({
List<String> keys = const [],
bool trim = true,
}) {
var all = _allData;
if (keys.isNotEmpty) {
var result = <String, Object?>{};
for (var key in keys) {
result[key] = get(key, trim: trim);
}
return result;
} else if (trim) {
all.forEach((key, value) {
if (value is String) {
all[key] = value.trim();
}
});
}
return all;
}