getValues method

Map<String, dynamic> getValues()

Get the current values of all existing form attributes.

The getValues function is used to retrieve the current values of all existing form attributes. It creates a copy of the _values map, removes entries for attributes that do not exist in the _attributes map, and returns the resulting map of attribute-value pairs.

Returns: A map of form attribute identifiers to their corresponding current values.

Implementation

Map<String, dynamic> getValues() {
  final Map<String, dynamic> values = Map.from(_values);
  values.removeWhere((key, value) => !_attributes.containsKey(key));
  return values;
}