getDisplayTitleFromMediaItem method

String getDisplayTitleFromMediaItem(
  1. MediaItem item
)

Given a MediaItem, return its title. Some media items may allow overriding of values for display purposes. If a source does this, override this function.

Implementation

String getDisplayTitleFromMediaItem(MediaItem item) {
  String? overrideTitle = getOverrideTitleFromMediaItem(item);
  if (overrideTitle != null) {
    return overrideTitle;
  }

  return item.title;
}