add prompt confirmation and update carton
This commit is contained in:
@@ -29,17 +29,21 @@ class _ContactEditorState extends State<ContactEditor> {
|
||||
TextEditingController _facebook = new TextEditingController();
|
||||
|
||||
bool _isLoading = false;
|
||||
bool isNew;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
if (widget.contact != null) {
|
||||
isNew = false;
|
||||
_usaPhone.text = widget.contact.usaContactNumber;
|
||||
_mmPhone.text = widget.contact.mmContactNumber;
|
||||
_usaAddress.text = widget.contact.usaAddress;
|
||||
_mmAddress.text = widget.contact.mmAddress;
|
||||
_email.text = widget.contact.emailAddress;
|
||||
_facebook.text = widget.contact.facebookLink;
|
||||
} else {
|
||||
isNew = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,9 +87,7 @@ class _ContactEditorState extends State<ContactEditor> {
|
||||
leading: new IconButton(
|
||||
icon: new Icon(CupertinoIcons.back, color: primaryColor),
|
||||
onPressed: () {
|
||||
showConfirmDialog(context, "back.button_confirm", () {
|
||||
Navigator.of(context).pop();
|
||||
});
|
||||
Navigator.of(context).pop();
|
||||
}),
|
||||
shadowColor: Colors.transparent,
|
||||
backgroundColor: Colors.white,
|
||||
|
||||
Reference in New Issue
Block a user