parse method Null safety

void parse()

Parses this and all children MIME parts.

Implementation

void parse() {
  _isParsed = true;
  if (mimeData != null) {
    mimeData!.parse(null);
    if (mimeData!.containsHeader) {
      headers = mimeData!.headersList;
    }
    if (mimeData!.hasParts) {
      parts = [];
      for (final dataPart in mimeData!.parts!) {
        final part = MimePart()
          ..mimeData = dataPart
          ..headers = dataPart.headersList;
        parts!.add(part);
        part.parse();
      }
    }
  } else if (parts != null) {
    for (final part in parts!) {
      part.parse();
    }
  }
}