version property Null safety

int version

The version number of the certificate.

Implementation

int get version {
  if (_offset != 0) {
    return 1;
  }
  final e =
      ASN1Parser(_tbs.elements!.first.valueBytes).nextObject() as ASN1Integer;
  return e.integer!.toInt() + 1;
}