add mix carton
This commit is contained in:
@@ -8,25 +8,12 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_icons/flutter_icons.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
|
||||
class DiscountListRow extends StatefulWidget {
|
||||
class DiscountListRow extends StatelessWidget {
|
||||
final Discount discount;
|
||||
const DiscountListRow({Key key, this.discount}) : super(key: key);
|
||||
DiscountListRow({Key key, this.discount}) : super(key: key);
|
||||
|
||||
@override
|
||||
_DiscountListRowState createState() => _DiscountListRowState();
|
||||
}
|
||||
|
||||
class _DiscountListRowState extends State<DiscountListRow> {
|
||||
final double dotSize = 15.0;
|
||||
Discount _discount;
|
||||
final DateFormat dateFormat = new DateFormat("dd MMM yyyy");
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_discount = widget.discount;
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return InkWell(
|
||||
@@ -34,7 +21,7 @@ class _DiscountListRowState extends State<DiscountListRow> {
|
||||
Navigator.push(
|
||||
context,
|
||||
CupertinoPageRoute(
|
||||
builder: (context) => DiscountEditor(discount: _discount)),
|
||||
builder: (context) => DiscountEditor(discount: discount)),
|
||||
);
|
||||
},
|
||||
child: Container(
|
||||
@@ -61,7 +48,7 @@ class _DiscountListRowState extends State<DiscountListRow> {
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 8.0),
|
||||
child: new Text(
|
||||
_discount.code ?? "",
|
||||
discount.code ?? "",
|
||||
style: new TextStyle(
|
||||
fontSize: 15.0, color: Colors.black),
|
||||
),
|
||||
@@ -69,7 +56,7 @@ class _DiscountListRowState extends State<DiscountListRow> {
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 10.0, top: 10),
|
||||
child: new Text(
|
||||
_discount.customerName ?? "",
|
||||
discount.customerName ?? "",
|
||||
style: new TextStyle(
|
||||
fontSize: 15.0, color: Colors.grey),
|
||||
),
|
||||
@@ -85,14 +72,14 @@ class _DiscountListRowState extends State<DiscountListRow> {
|
||||
children: <Widget>[
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(0),
|
||||
child: Text(_discount.status),
|
||||
child: Text(discount.status),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 8.0, top: 5, bottom: 5),
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
new Text(
|
||||
"${_discount.amount ?? ''}",
|
||||
"${discount.amount ?? ''}",
|
||||
style:
|
||||
new TextStyle(fontSize: 15.0, color: Colors.grey),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user