UserNotice.fromAsn1 constructor

UserNotice.fromAsn1(
  1. ASN1Sequence sequence
)

The ASN.1 definition is:

UserNotice ::= SEQUENCE { noticeRef NoticeReference OPTIONAL, explicitText DisplayText OPTIONAL }

Implementation

factory UserNotice.fromAsn1(ASN1Sequence sequence) {
  NoticeReference? noticeRef;
  String? explicitText;
  for (var e in sequence.elements) {
    if (e is ASN1Sequence) {
      noticeRef = NoticeReference.fromAsn1(e);
    } else {
      explicitText = toDart(e);
    }
  }
  return UserNotice(noticeRef: noticeRef, explicitText: explicitText);
}