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 {
late String id;
late String? image;
late String name;
late String? category;
late Map<String, ItemVariant> variants;
Item(Map<String, dynamic> json) {
id = json["uuid"];
image = json["image"];
name = json["name"];
category = json["category"];
variants = <String, ItemVariant>{};

View file

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