check null safety
This commit is contained in:
@@ -37,7 +37,7 @@ class _InvitationEditorState extends State<InvitationEditor> {
|
||||
)),
|
||||
IconButton(
|
||||
icon: Icon(Icons.open_in_new, color: primaryColor),
|
||||
onPressed: () => call(context, widget.customer!.phoneNumber)),
|
||||
onPressed: () => call(context, widget.customer?.phoneNumber ?? "")),
|
||||
],
|
||||
);
|
||||
|
||||
@@ -57,7 +57,7 @@ class _InvitationEditorState extends State<InvitationEditor> {
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
),
|
||||
title: Text(
|
||||
widget.customer!.name,
|
||||
widget.customer?.name ?? "",
|
||||
style: TextStyle(fontSize: 20, color: primaryColor),
|
||||
),
|
||||
),
|
||||
@@ -87,7 +87,7 @@ class _InvitationEditorState extends State<InvitationEditor> {
|
||||
CustomerModel customerModel =
|
||||
Provider.of<CustomerModel>(context, listen: false);
|
||||
try {
|
||||
await customerModel.deleteInvite(widget.customer!.phoneNumber);
|
||||
await customerModel.deleteInvite(widget.customer?.phoneNumber ?? "");
|
||||
Navigator.pop(context);
|
||||
} catch (e) {
|
||||
showMsgDialog(context, "Error", e.toString());
|
||||
|
||||
Reference in New Issue
Block a user