import 'package:flutter/material.dart'; import 'package:softplayer_web/models/catalog_entry.dart'; class CatalogCard extends StatelessWidget { const CatalogCard({ super.key, required this.data, }); final List data; List createCards(List data) { List createCards = []; for (var app in data) { createCards.add(Card( child: Column( mainAxisSize: MainAxisSize.min, children: [ ListTile( //leading: Image.network(app.logoUrl), leading: const Icon(Icons.nfc), title: Text(app.name), subtitle: Text(app.description), ), Row( mainAxisAlignment: MainAxisAlignment.end, children: [ TextButton( child: const Text('INSTALL'), onPressed: () { print("installing"); }, ), const SizedBox(width: 8), ], ), ], ), )); } return createCards; } @override Widget build(BuildContext context) { return Column( children: createCards(data), ); } }