added swiping

add swiping
This commit is contained in:
Mehul Ahal 2022-12-22 12:17:08 +01:00 committed by Mguy13
parent 2ff4d44d25
commit 127a09b597
10 changed files with 154 additions and 82 deletions

View file

@ -16,6 +16,7 @@ class GalleryView extends StatelessWidget {
viewModelBuilder: () => GalleryViewModel.locate,
builder: (context, final model) => McgScaffold(
bodyBuilderWaiter: model.isInitialised,
forceInternetCheck: true,
appBar: AppBar(
title: Text(model.strings.gallery),
),
@ -46,15 +47,12 @@ class GalleryView extends StatelessWidget {
context,
imageModel: imageModel,
),
child: Hero(
tag: imageModel.imageIndex.toString(),
child: CachedNetworkImage(
imageUrl: imageModel.uri.toString(),
cacheKey: imageModel.imageIndex.toString(),
progressIndicatorBuilder: (_, __, final progress) =>
CircularProgressIndicator(
value: model.downloadProgressValue(progress: progress),
),
child: CachedNetworkImage(
imageUrl: imageModel.uri.toString(),
cacheKey: imageModel.imageIndex.toString(),
progressIndicatorBuilder: (_, __, final progress) =>
CircularProgressIndicator(
value: model.downloadProgressValue(progress: progress),
),
),
),