58 lines
1.6 KiB
Dart
58 lines
1.6 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:aman_kassa_flutter/shared/app_colors.dart';
|
|
import 'package:aman_kassa_flutter/core/models/ProductDao.dart';
|
|
|
|
class ProductListItem extends StatelessWidget {
|
|
|
|
ProductDao item;
|
|
|
|
ProductListItem({
|
|
this.item
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Container(
|
|
padding: EdgeInsets.symmetric(vertical: 8, horizontal: 4),
|
|
child: Column(
|
|
children: <Widget>[
|
|
Container(
|
|
child: Row(
|
|
children: <Widget>[
|
|
Expanded(
|
|
child: Container(
|
|
color: whiteColor,
|
|
padding: EdgeInsets.symmetric(vertical: 8, horizontal: 4),
|
|
child: Text(item.name)
|
|
),
|
|
),
|
|
Expanded(
|
|
child: Container(
|
|
color: whiteColor,
|
|
padding: EdgeInsets.symmetric(vertical: 8, horizontal: 4),
|
|
child: Text('${item.price?.toString()} x ${item.count?.toString()}', textAlign: TextAlign.right)
|
|
),
|
|
)
|
|
],
|
|
),
|
|
),
|
|
Row(
|
|
children: <Widget>[
|
|
Expanded(
|
|
child: Container(
|
|
color: whiteColor,
|
|
padding: EdgeInsets.symmetric(vertical: 8, horizontal: 4),
|
|
child: Text(item.name)
|
|
),
|
|
),
|
|
Expanded(
|
|
child: Container(child: Text(item.name)),
|
|
)
|
|
],
|
|
)
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|