null safety
This commit is contained in:
@@ -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();
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user