live WEB search
This commit is contained in:
parent
47945dbec7
commit
4ade7f1682
19 changed files with 503 additions and 59 deletions
44
lib/features/home/views/gallery/downloaded_gallery_view.dart
Normal file
44
lib/features/home/views/gallery/downloaded_gallery_view.dart
Normal file
|
@ -0,0 +1,44 @@
|
|||
part of 'gallery_view.dart';
|
||||
|
||||
class _DownloadedGalleryView extends StatelessWidget {
|
||||
const _DownloadedGalleryView({
|
||||
required this.galleryViewModel,
|
||||
super.key,
|
||||
});
|
||||
|
||||
final GalleryViewModel galleryViewModel;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return DecoratedBox(
|
||||
decoration: const BoxDecoration(color: ConstColours.galleryBackgroundColour),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8),
|
||||
// Using Wrap instead of GridView, to make use of different image sizes
|
||||
child: Wrap(
|
||||
runSpacing: 24,
|
||||
spacing: 8,
|
||||
alignment: WrapAlignment.center,
|
||||
runAlignment: WrapAlignment.center,
|
||||
crossAxisAlignment: WrapCrossAlignment.center,
|
||||
children: [
|
||||
for (final imageModel in galleryViewModel.imageModels)
|
||||
GestureDetector(
|
||||
onTap: () => galleryViewModel.pushImageCarouselView(
|
||||
context,
|
||||
imageModel: imageModel,
|
||||
),
|
||||
child: CachedNetworkImage(
|
||||
imageUrl: imageModel.uri.toString(),
|
||||
cacheKey: imageModel.imageIndex.toString(),
|
||||
progressIndicatorBuilder: (_, __, final progress) => CircularProgressIndicator(
|
||||
value: galleryViewModel.downloadProgressValue(progress: progress),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue