add two decimal and add confirm dialog if press back button
This commit is contained in:
@@ -33,7 +33,7 @@ class _CustomEditorState extends State<CustomEditor> {
|
||||
if (widget.custom != null) {
|
||||
_custom = widget.custom;
|
||||
_productController.text = _custom.productType;
|
||||
_feeController.text = _custom.fee.toString();
|
||||
_feeController.text = _custom.fee.toStringAsFixed(2);
|
||||
} else {
|
||||
_isNew = true;
|
||||
}
|
||||
@@ -63,7 +63,11 @@ class _CustomEditorState extends State<CustomEditor> {
|
||||
icon: new Icon(
|
||||
CupertinoIcons.back,
|
||||
),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
onPressed: () {
|
||||
showConfirmDialog(context, "back.button_confirm", () {
|
||||
Navigator.of(context).pop();
|
||||
});
|
||||
},
|
||||
),
|
||||
backgroundColor: primaryColor,
|
||||
title:
|
||||
|
||||
Reference in New Issue
Block a user