feat: Added new image detail screen

This commit is contained in:
Deven Joshi
2020-11-12 17:04:01 +05:30
parent 264b11362e
commit 3ad6a25a82
6 changed files with 345 additions and 49 deletions
+5 -27
View File
@@ -110,34 +110,12 @@ class ImageGroup extends StatelessWidget {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) {
return Scaffold(
appBar: AppBar(
backgroundColor: Colors.transparent,
iconTheme: IconThemeData(
color: Colors.white,
),
builder: (context) =>
FullScreenImage(urls: images.map((e) => e.imageUrl).toList(),
startIndex: index,
userName: message.user.name,
sentAt: message.createdAt,
),
backgroundColor: Colors.black,
body: SizedBox.expand(
child: CarouselSlider(
items: images
.map((image) => FullScreenImage(
url: image.imageUrl ??
image.thumbUrl ??
image.assetUrl,
))
.toList(),
options: CarouselOptions(
initialPage: index ?? 0,
enableInfiniteScroll: false,
viewportFraction: 0.95,
height: MediaQuery.of(context).size.height,
),
),
),
);
},
),
);
}