contact_cardio library

Parses Strings into objects representing a variety of types of contact info including phone numbers, email addresses, etc.

To parse a String s into a contact card format, use the static method ContactCard.deserialize as such:

import 'package:contact_cardio/contact_cardio.dart';

...
String s = ...
val contactCard = ContactCard.deserialize(s);

If s contains contact info in a format understood by contact_cardio, then contactCard will be an instance of a concrete subclass of ContactCard. Otherwise, s will be null.

Classes

AbstractVCardIanaParamValue
An abstract class representing a parameter value in a parameter whose name has been specified by the IANA's document regarding vCards (as opposed to an extension parameter).
AbstractVCardParam
An abstract class representing a parameter in a vCard property
ContactCard
Parent class for a unit of String-representable contact information. [...]
EmailAddressContactCard
A ContactCard representing contact information related to email.
IVCardAddress
An abstract class representing an address within a vCard.
IVCardExtendedLabeledValue
An abstract class representing an extension vCard property. Consumers of this library may do whatever they please with such properties, but this library always treats extension properties' values as Strings to remain neutral as to their meaning.
IVCardIanaBoundedParamValue
An abstract class representing a parameter value in a parameter whose name and possible values have been explicitly specified by the IANA's document regarding vCards (as opposed to values specified elsewhere such as language codes).
IVCardIanaParam
An abstract class representing a parameter in a vCard property whose name has been explicitly specified by the IANA's document regarding vCards and whose possible values are either explicitly enumerated in the same document, or are described in the same document as being enumerated in some other document.
IVCardIanaUnboundedParamValue
An abstract class representing a parameter value in a parameter whose name has been specified by the IANA's document regarding vCards, but whose possible values are specified elsewhere (such as language codes).
IVCardLabeledValue<T>
An abstract generic class representing a vCard property the type of which has been explicitly enumerated in the IANA's document regarding vCards. Different types of vCard properties represent different types of information, but they all are allowed to have a "group" (which may be null) and a list of parameters (some properties require the list of parameters to be empty).
IVCardLatLng
An abstract class representing a location on a planet given by latitude and longitude within a vCard. n.b.: Strings are used to preserve decimal precision.
IVCardName
An abstract class representing a name within a vCard.
IVCardOrganization
An abstract class representing an organization within a vCard.
IVCardXParam
An abstract class representing a parameter in a vCard property which is not explicitly enumerated by the IANA's document regarding vCards, but which is allowed as an extension parameter in the vCard specification. Though parameter values may be the same as those enumerated in the IANA's document regarding vCards, they are represented as strings and may have semantics unrelated to those set forth in the IANA document.
MeCardAddress
A MeCard address as specified by NTT Docomo's page for i-mode phonebook registration
MeCardContactCard
A ContactCard consisting of a MeCard as specified by NTT Docomo's page for i-mode phonebook registration. A MeCard may contain up to one name value (with the first comma treated as specified by NTT Docomo), up to one "reading" value (again, with the first comma treated as specified by NTT Docomo), zero or more "TEL" values, zero or more "TEL-AV" values, zero or more email values, up to one "memo" value, up to one birthday value, zero or more address values (with commas treated as specified by NTT Docomo), zero or more URL values, and up to one nickname value. [...]
PhoneNumberContactCard
A ContactCard representing contact information relating to phone numbers.
RawEmailAddressContactCard
A SingleEmailAddressContactCard containing only an email address.
RawPhoneNumberContactCard
A SinglePhoneNumberContactCard containing just a single phone number. [...]
SingleEmailAddressContactCard
An EmailAddressContactCard representing contact information in a format which always contains exactly one email address.
SinglePhoneNumberContactCard
A PhoneNumberContactCard representing contact information in a format which always contains exactly one phone number.
UriEmailAddressContactCard
An EmailAddressContactCard containing a single URI conforming to the mailto URI scheme specified in RFC 6068 [...]
UriPhoneNumberContactCard
A SinglePhoneNumberContactCard containing a single URI conforming to the tel URI scheme specified in RFC 5341 [...]
VCard
A vCard within a vCard entity (which may contain more than one vCard). Concrete subclasses should return a constant value for vCardVersion. The fields here, aside from version, are specified in the order listed in the ABNF portion of the vCard 3.0 specification set forth in RFC 2426. Properties which are not allowed in all of the versions of the vCard format are not included, and should be included in concrete subclasses of this class corresponding to vCard versions which support such properties. Some properties have been excluded for ease of implementation.
VCard3_0
A vCard conforming to the version 3.0 specification set forth in RFC 2426.
VCardContactCard
A ContactCard representing a vCard entity. [...]

Enums

VCardIanaParamName
An enumeration of the vCard property parameter names explicitly enumerated by the IANA. The IANA document regarding vCards can be found here. Note that each version of vCard specifies which parameter names can be used in each of the properties supported by that version.
VCardIanaParamValue
An enumeration of the vCard property parameter values explicitly enumerated by the IANA or by the specification for one of the vCard versions. The IANA document regarding vCards can be found here. Note that some parameters specified by the IANA or by the specification for one of the vCard versions may have values which are enumerated elsewhere (such as language codes).
VCardIanaPropertyKey
An enumeration of the vCard properties explicitly enumerated by the IANA. The IANA document regarding vCards can be found here. Note that each version of vCard only supports a subset of these values.
VCardVersion
An enumeration of the vCard versions in use.