buildMetadata method

Widget buildMetadata(
  1. MediaItem item
)

Build the right side of the history containing video information.

Implementation

Widget buildMetadata(MediaItem item) {
  MediaSource source = item.getMediaSource(appModel: appModel);

  return Column(
    crossAxisAlignment: CrossAxisAlignment.start,
    children: [
      Text(
        source.getDisplayTitleFromMediaItem(item),
        maxLines: 2,
        overflow: TextOverflow.ellipsis,
        softWrap: true,
      ),
      const SizedBox(height: 8),
      Text(
        source.getDisplaySubtitleFromMediaItem(item),
        style: TextStyle(
          color: Theme.of(context).unselectedWidgetColor,
          fontSize: 12,
        ),
        maxLines: 2,
        overflow: TextOverflow.ellipsis,
        softWrap: true,
      ),
      const SizedBox(height: 2),
      Row(
        children: [
          Icon(
            source.icon,
            color: Theme.of(context).unselectedWidgetColor,
            size: 12,
          ),
          const SizedBox(width: 4),
          Text(
            source.getLocalisedSourceName(appModel),
            style: TextStyle(
              color: Theme.of(context).unselectedWidgetColor,
              fontWeight: FontWeight.w500,
              fontSize: 12,
            ),
            maxLines: 2,
            overflow: TextOverflow.ellipsis,
            softWrap: true,
          ),
        ],
      ),
      ...extraMetadata(item),
    ],
  );
}