Principal.from constructor

Principal.from(
  1. Object? other
)

Implementation

factory Principal.from(Object? other) {
  if (other is String) {
    return Principal.fromText(other);
  } else if (other is Map<String, dynamic> && other['_isPrincipal'] == true) {
    return Principal(other['_arr'], subAccount: other['_subAccount']);
  } else if (other is Principal) {
    return Principal(other._principal, subAccount: other.subAccount);
  }
  throw UnreachableError();
}