kopia lustrzana https://gitlab.com/mysocialportal/relatica
Update image viewer to have description
rodzic
158c0c872e
commit
f6e09b08f5
|
@ -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),
|
||||
),
|
||||
],
|
||||
));
|
||||
}
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue