icon property

Map<String?, Uint8List?>? get icon

Gets the first icon as a map of MIME type to payload.

Implementation

Map<String?, Uint8List?>? get icon {
  if (iconRecord != null) {
    return {iconRecord!.decodedType: iconRecord!.payload};
  } else {
    return null;
  }
}
set icon (Map<String?, Uint8List?>? icon)

Sets the icon (replaces or adds the first icon record).

The map should contain a MIME type as key and image/video data as value.

Implementation

set icon(Map<String?, Uint8List?>? icon) {
  String? decodedType = icon!.keys.toList()[0];
  _checkValidIconType(decodedType!);
  iconRecord = MimeRecord(
    decodedType: decodedType,
    payload: icon.values.toList()[0],
  );
}