Principal.from constructor
Principal.from(
- 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();
}