null safety

This commit is contained in:
phyothandar
2021-09-10 12:00:08 +06:30
parent a144c945b6
commit 5e672937b5
67 changed files with 901 additions and 896 deletions

View File

@@ -11,9 +11,9 @@ import 'package:intl/intl.dart';
import 'package:provider/provider.dart';
class InvoiceCustomerList extends StatefulWidget {
final FcsShipment fcsShipment;
final FcsShipment? fcsShipment;
const InvoiceCustomerList({Key key, this.fcsShipment}) : super(key: key);
const InvoiceCustomerList({Key? key, this.fcsShipment}) : super(key: key);
@override
_InvoiceCustomerListState createState() => _InvoiceCustomerListState();
@@ -33,7 +33,7 @@ class _InvoiceCustomerListState extends State<InvoiceCustomerList> {
_load() async {
CustomerModel customerModel =
Provider.of<CustomerModel>(context, listen: false);
var users = await customerModel.getInvoiceUsers(widget.fcsShipment.id);
var users = await customerModel.getInvoiceUsers(widget.fcsShipment!.id);
setState(() {
_users = users;
});
@@ -88,7 +88,7 @@ class _InvoiceCustomerListState extends State<InvoiceCustomerList> {
customer: customer,
fcsShipment: widget.fcsShipment,
)));
if (created ?? false) {
if (created) {
_load();
}
},