fix item id
This commit is contained in:
parent
4b9e616581
commit
db0841d716
2 changed files with 7 additions and 7 deletions
|
@ -30,7 +30,7 @@ class ItemsPage extends StatelessWidget {
|
|||
}
|
||||
|
||||
class ItemTile extends StatelessWidget {
|
||||
final String item;
|
||||
final Item item;
|
||||
|
||||
const ItemTile(this.item, {super.key});
|
||||
|
||||
|
@ -38,10 +38,10 @@ class ItemTile extends StatelessWidget {
|
|||
Widget build(BuildContext context) {
|
||||
return ListTile(
|
||||
onTap: () {
|
||||
API().getItem(item).then((itemInfo) => Navigator.push(context,
|
||||
MaterialPageRoute(builder: (context) => ItemView(item: itemInfo))));
|
||||
Navigator.push(context,
|
||||
MaterialPageRoute(builder: (context) => ItemView(item: item)));
|
||||
},
|
||||
title: Text(item),
|
||||
title: Text(item.name),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue