Part.fromXml constructor

Part.fromXml(
  1. XmlElement xml
)

Implementation

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