add markdown for term
This commit is contained in:
@@ -8,8 +8,9 @@ typedef OnSelect(Discount discount);
|
||||
|
||||
class DiscountListRow extends StatelessWidget {
|
||||
final OnSelect? onSelect;
|
||||
final Discount? discount;
|
||||
DiscountListRow({Key? key, this.discount, this.onSelect}) : super(key: key);
|
||||
final Discount discount;
|
||||
DiscountListRow({Key? key, required this.discount, this.onSelect})
|
||||
: super(key: key);
|
||||
|
||||
final DateFormat dateFormat = new DateFormat("dd MMM yyyy");
|
||||
|
||||
@@ -17,9 +18,7 @@ class DiscountListRow extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return InkWell(
|
||||
onTap: () {
|
||||
if (onSelect != null && discount != null) {
|
||||
onSelect!(discount!);
|
||||
}
|
||||
onSelect!(discount);
|
||||
},
|
||||
child: Container(
|
||||
padding: EdgeInsets.only(left: 15, right: 15),
|
||||
@@ -27,38 +26,31 @@ class DiscountListRow extends StatelessWidget {
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: new Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 16.0),
|
||||
padding: const EdgeInsets.symmetric(vertical: 13),
|
||||
child: new Row(
|
||||
children: <Widget>[
|
||||
Container(
|
||||
padding: EdgeInsets.only(left: 5, right: 10),
|
||||
child: Icon(
|
||||
Entypo.price_ribbon,
|
||||
color: primaryColor,
|
||||
size: 30,
|
||||
),
|
||||
),
|
||||
Icon(Entypo.price_ribbon, color: primaryColor, size: 30),
|
||||
new Expanded(
|
||||
child: new Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 8.0),
|
||||
child: new Text(
|
||||
discount?.code ?? "",
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(left: 15),
|
||||
child: new Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
new Text(
|
||||
discount.code ?? "",
|
||||
style: new TextStyle(
|
||||
fontSize: 15.0, color: Colors.black),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 10.0, top: 10),
|
||||
child: new Text(
|
||||
discount?.customerName ?? "",
|
||||
style: new TextStyle(
|
||||
fontSize: 15.0, color: Colors.grey),
|
||||
),
|
||||
)
|
||||
],
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 5),
|
||||
child: new Text(
|
||||
discount.customerName ?? "",
|
||||
style: new TextStyle(
|
||||
fontSize: 15.0, color: Colors.grey),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -66,17 +58,17 @@ class DiscountListRow extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: <Widget>[
|
||||
Text(discount.status ?? ''),
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(0),
|
||||
child: Text(discount?.status ?? ''),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 8.0, top: 5, bottom: 5),
|
||||
padding: const EdgeInsets.only(
|
||||
top: 5,
|
||||
),
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
new Text(
|
||||
"${discount?.amount.toStringAsFixed(2) ?? ''}",
|
||||
"${discount.amount.toStringAsFixed(2)}",
|
||||
style:
|
||||
new TextStyle(fontSize: 15.0, color: Colors.grey),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user