mirrored_repositories/catalog_app_flutter/lib
import 'package:catalog_flutter_application/models/catalog.dart';
import 'package:flutter/material.dart';

class CatalogItem extends StatelessWidget {
  final Item item;

  const CatalogItem({Key? key, required this.item})
      : assert(item != null),
        super(key: key);
  @override
  Widget build(BuildContext context) {
    return Card(
      child: Padding(
        padding: const EdgeInsets.all(15),
        child: ListTile(
          leading: Image.network(item.image),
          title: Text(item.name),
          subtitle: Text(item.desc),
          trailing: Text(
            "\$${item.price}",
            style: const TextStyle(
                color: Colors.deepPurple,
                fontWeight: FontWeight.bold,
                fontSize: 18),
          ),
        ),
      ),
    );
  }
}
