image
This commit is contained in:
parent
61134f7b63
commit
7ee1cda550
2 changed files with 10 additions and 5 deletions
|
@ -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>{};
|
||||||
|
|
|
@ -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,
|
||||||
|
|
Loading…
Reference in a new issue