generateMediaItem method

MediaItem generateMediaItem(
  1. BrowserBookmark bookmark,
  2. {String? base64Image}
)

Helper to generate a media item with parameters.

Implementation

MediaItem generateMediaItem(BrowserBookmark bookmark, {String? base64Image}) {
  return MediaItem(
    mediaIdentifier: bookmark.url,
    title: bookmark.name,
    mediaTypeIdentifier: mediaType.uniqueKey,
    mediaSourceIdentifier: uniqueKey,
    base64Image: base64Image,
    position: 0,
    duration: 0,
    canDelete: true,
    canEdit: true,
  );
}