This commit is contained in:
JMARyA 2024-10-18 11:02:28 +02:00
parent 61134f7b63
commit 7ee1cda550
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263
2 changed files with 10 additions and 5 deletions

View file

@ -361,12 +361,14 @@ class FlowInfo {
class Item { class Item {
late String id; late String id;
late String? image;
late String name; late String name;
late String? category; late String? category;
late Map<String, ItemVariant> variants; late Map<String, ItemVariant> variants;
Item(Map<String, dynamic> json) { Item(Map<String, dynamic> json) {
id = json["uuid"]; id = json["uuid"];
image = json["image"];
name = json["name"]; name = json["name"];
category = json["category"]; category = json["category"];
variants = <String, ItemVariant>{}; variants = <String, ItemVariant>{};

View file

@ -43,12 +43,15 @@ class _ItemViewState extends State<ItemView> {
Row( Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: [ children: [
const Align( Align(
alignment: Alignment.centerLeft, alignment: Alignment.centerLeft,
child: Placeholder( child: widget.item.image != null
fallbackWidth: 100, ? Image.network(
fallbackHeight: 100, "${API().instance}/${widget.item.image}",
), height: 100,
width: 100,
)
: null,
), ),
const SizedBox( const SizedBox(
width: 16.0, width: 16.0,