update contact
This commit is contained in:
@@ -33,9 +33,14 @@ class _ContactEditorState extends State<ContactEditor> {
|
||||
Contact? _contact;
|
||||
@override
|
||||
void initState() {
|
||||
if (widget.contact != null) _contact = widget.contact!;
|
||||
super.initState();
|
||||
isNew = widget.contact == null;
|
||||
if (widget.contact != null) {
|
||||
isNew = false;
|
||||
_contact = widget.contact;
|
||||
initContact();
|
||||
} else {
|
||||
isNew = true;
|
||||
}
|
||||
}
|
||||
|
||||
initContact() {
|
||||
|
||||
Reference in New Issue
Block a user