add method Null safety

void add(
  1. String name,
  2. dynamic value
)

Add a field name to the form data.

value will be converted to a string using Object.toString and encoded using FormData.encoding.

Implementation

void add(String name, dynamic value) {
  _isDirty = true;
  _entries.add(
    Entry.value(encoding.encode(name), encoding.encode(value.toString())),
  );
}