|
|
|
import 'package:diplomaticquarterapp/core/model/pharmacies/Manufacturer.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
import '../../final_products_page.dart';
|
|
|
|
|
|
|
|
class ManufacturerItem extends StatelessWidget {
|
|
|
|
final Manufacturer item;
|
|
|
|
|
|
|
|
ManufacturerItem(this.item);
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return InkWell(
|
|
|
|
onTap: () {
|
|
|
|
Navigator.push(
|
|
|
|
context,
|
|
|
|
MaterialPageRoute(
|
|
|
|
builder: (context) => FinalProductsPage(
|
|
|
|
id: item.id, productType: 2,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
},
|
|
|
|
child: Card(
|
|
|
|
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)),
|
|
|
|
margin: EdgeInsets.symmetric(
|
|
|
|
horizontal: 8,
|
|
|
|
vertical: 4,
|
|
|
|
),
|
|
|
|
child: Container(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
border: Border(
|
|
|
|
right: BorderSide(color: Colors.grey.shade300, width: 1),
|
|
|
|
bottom: BorderSide(color: Colors.grey.shade300, width: 1),
|
|
|
|
left: BorderSide(color: Colors.grey.shade300, width: 1),
|
|
|
|
top: BorderSide(color: Colors.grey.shade300, width: 1)),
|
|
|
|
),
|
|
|
|
child: Padding(
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 8),
|
|
|
|
child: Image.network(
|
|
|
|
item.image.src,
|
|
|
|
fit: BoxFit.cover,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|