addField method

void addField({
  1. required ContactInfoFieldType type,
  2. required String value,
  3. required String name,
})

Adds a new field to this contact info instance.

The new field will be appended to the internal list. Use fieldsCount to determine the new index.

Parameters

  • type: The field type (for example phone, email or url).
  • value: The field value (for example a phone number or email address).
  • name: A short display name for the field (used by UI components).

Implementation

void addField({
  required final ContactInfoFieldType type,
  required final String value,
  required final String name,
}) {
  objectMethod(
    pointerId,
    'ContactInfo',
    'addField',
    args: <String, dynamic>{'type': type.id, 'value': value, 'name': name},
  );
}