ContactKeys.of constructor

ContactKeys.of(
  1. ContactMode mode,
  2. dynamic dyn
)

Implementation

factory ContactKeys.of(ContactMode mode, dyn) {
  if (dyn == null) {
    return ContactKeys.empty(mode);
  } else if (dyn is ContactKeys) {
    return dyn;
  } else if (dyn is Map) {
    return ContactKeys.fromMap(mode, dyn);
  } else if (dyn is String) {
    return ContactKeys.id(mode, dyn);
  } else {
    return (throw "Invalid input for ContactKeys");
  }
}