added a swipeable media gallery for chat and folder images and videos with server previews, on-demand originals and zoom, and marked document previews in chat so they no longer pass for photos
This commit is contained in:
1 parent
952f916231
commit
aa176c90e3
22 files changed
+1658
-103
No files matched your search
@@ -0,0 +1,21 @@
|
||||
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<GalleryItem> get items;
|
||||
|
||||
bool get hasOlder => false;
|
||||
|
||||
/// Called when the user nears the start (oldest end) of [items].
|
||||
Future<void> loadOlder() async {}
|
||||
}
|
||||
|
||||
class StaticGallerySource extends GallerySource {
|
||||
@override
|
||||
final List<GalleryItem> items;
|
||||
|
||||
StaticGallerySource(this.items);
|
||||
}
|
||||
Reference in new issue
Block a user