check null safety
This commit is contained in:
@@ -125,7 +125,7 @@ class _CustomerListState extends State<CustomerList> {
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 2.0),
|
||||
child: new Text(
|
||||
customer.name,
|
||||
customer.name ?? "",
|
||||
style: new TextStyle(
|
||||
fontSize: 20.0, color: primaryColor),
|
||||
),
|
||||
@@ -171,7 +171,7 @@ class _CustomerListState extends State<CustomerList> {
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(right: 5),
|
||||
child: _status(customer.status),
|
||||
child: _status(customer.status ?? ""),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(right: 5),
|
||||
@@ -222,17 +222,17 @@ class _CustomerListState extends State<CustomerList> {
|
||||
)))
|
||||
.then((value) {
|
||||
if (customer.fcsUnseenCount > 0) {
|
||||
messageModel.seenMessages(customer.id, false);
|
||||
messageModel.seenMessages(customer.id ?? "", false);
|
||||
}
|
||||
});
|
||||
if (customer.fcsUnseenCount > 0) {
|
||||
messageModel.seenMessages(customer.id, false);
|
||||
messageModel.seenMessages(customer.id ?? "", false);
|
||||
}
|
||||
}
|
||||
|
||||
_share(User user) async {
|
||||
MainModel mainModel = Provider.of<MainModel>(context, listen: false);
|
||||
String appUrl = mainModel.setting.appUrl;
|
||||
String appUrl = mainModel.setting?.appUrl ?? "";
|
||||
final RenderBox? box = context.findRenderObject() as RenderBox;
|
||||
await Share.share(
|
||||
"Join us on FCS Logistics App. Here is the link:\n $appUrl\n" +
|
||||
|
||||
Reference in New Issue
Block a user