Added an app bar for images

This commit is contained in:
Mrdabup 2024-10-11 11:10:34 -04:00
parent 38a277348f
commit 60e8e428e8

View file

@ -192,12 +192,18 @@ class _InventoryBrowserState extends State<InventoryBrowser> with AutomaticKeepA
: () async { : () async {
await Navigator.push( await Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(
builder: (context) => PhotoView( builder: (context) => Scaffold(
minScale: PhotoViewComputedScale.contained, appBar: AppBar(
imageProvider: title: Text(record.formattedName.toString()),
CachedNetworkImageProvider(Aux.resdbToHttp(record.thumbnailUri)), ),
heroAttributes: PhotoViewHeroAttributes(tag: record.id), body: Center (
child: CachedNetworkImage(
imageUrl: (Aux.resdbToHttp(record.thumbnailUri)),
placeholder: (context, url) => const CircularProgressIndicator(),
errorWidget: (context, url, error) => const Icon(Icons.error),
),
),
), ),
), ),
); );