import 'package:flutter/foundation.dart'; import 'gallery_item.dart'; /// Items the media gallery pages through. Sources that grow while the viewer /// is open (chat history) notify; the viewer keeps the shown item in place. abstract class GallerySource extends ChangeNotifier { List get items; bool get hasOlder => false; /// Called when the user nears the start (oldest end) of [items]. Future loadOlder() async {} } class StaticGallerySource extends GallerySource { @override final List items; StaticGallerySource(this.items); }