from static method
Reads record as a media record, or returns null when it is not one.
Implementation
static MimeRecord? from(NdefRecord record) {
if (record.typeNameFormat != NdefTypeNameFormat.media) return null;
if (record.type.isEmpty) return null;
return MimeRecord._(mimeType: ascii.decode(record.type, allowInvalid: true), data: record.payload);
}