of static method

Contact? of(
  1. dynamic dyn,
  2. ContactMode mode
)

Implementation

static Contact? of(final dyn, ContactMode mode) {
  if (dyn == null) {
    return null;
  } else if (dyn is Contact) {
    return dyn;
  } else {
    return Contact.fromMap(dyn, mode);
  }
}