Part.fromXml constructor

Part.fromXml(
  1. XmlElement xml
)

Implementation

Part.fromXml(XmlElement xml) {
  eTag = getProp(xml, 'ETag')?.innerText;
  lastModified = DateTime.parse(getProp(xml, 'LastModified')!.innerText);
  partNumber = int.tryParse(getProp(xml, 'PartNumber')!.innerText);
  size = int.tryParse(getProp(xml, 'Size')!.innerText);
}