null safety

This commit is contained in:
phyothandar
2021-09-10 16:48:21 +06:30
parent 03c5fc5016
commit bb4f4ad7c2
40 changed files with 393 additions and 352 deletions

View File

@@ -58,7 +58,9 @@ class InvoiceListRow extends StatelessWidget {
fontSize: 13.0, color: primaryColor),
),
new Text(
dateFormatter.format(invoice!.invoiceDate!),
invoice!.invoiceDate != null
? dateFormatter.format(invoice!.invoiceDate!)
: '',
style: new TextStyle(
fontSize: 15.0, color: Colors.grey),
)

View File

@@ -86,7 +86,7 @@ class _InvoiceShipmentListRowState extends State<InvoiceShipmentListRow> {
),
Padding(
padding: const EdgeInsets.all(0),
child: getStatus(_fcsShipment.status!),
child: getStatus(_fcsShipment.status??"")
),
],
),