Update image viewer to have description

codemagic-setup
Hank Grabowski 2022-12-19 14:29:58 -05:00
rodzic 158c0c872e
commit f6e09b08f5
1 zmienionych plików z 23 dodań i 11 usunięć

Wyświetl plik

@ -11,18 +11,30 @@ class ImageViewerScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(),
body: Stack(
children: [
Container(
color: Theme.of(context).backgroundColor,
height: MediaQuery.of(context).size.height,
appBar: AppBar(),
body: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
child: InteractiveViewer(
child: CachedNetworkImage(imageUrl: attachment.uri.toString()),
clipBehavior: Clip.none,
constrained: true,
maxScale: 10.0,
)),
],
),
);
scaleFactor: 0.1,
child: CachedNetworkImage(imageUrl: attachment.uri.toString()),
),
),
if (attachment.description.isNotEmpty)
Padding(
padding: const EdgeInsets.only(
left: 8.0,
right: 8.0,
bottom: 8.0,
),
child: Text(attachment.description),
),
],
));
}
}