generateMediaItem method
Generate a media item given required parameters.
Implementation
MediaItem generateMediaItem({
required String title,
required String imageUrl,
required String url,
required int pageCount,
}) {
return MediaItem(
mediaIdentifier: url,
imageUrl: imageUrl,
title: title,
position: 0,
duration: pageCount,
mediaTypeIdentifier: mediaType.uniqueKey,
mediaSourceIdentifier: uniqueKey,
canDelete: true,
canEdit: true,
);
}