buildHistory method

  1. @override
Widget buildHistory(
  1. List<MediaItem> items
)
override

This is shown as the body when shouldPlaceholderBeShown is false.

Implementation

@override
Widget buildHistory(List<MediaItem> items) {
  items = items.reversed.toList();

  return RawScrollbar(
    thumbVisibility: true,
    thickness: 3,
    controller: mediaType.scrollController,
    child: ListView.builder(
      padding: const EdgeInsets.only(top: 56),
      controller: mediaType.scrollController,
      physics: const AlwaysScrollableScrollPhysics(
        parent: BouncingScrollPhysics(),
      ),
      itemCount: items.length,
      itemBuilder: (context, index) => buildMediaItem(items[index]),
    ),
  );
}