round up total and split per person
This commit is contained in:
@@ -191,6 +191,15 @@ class _TipCalcState extends State<TipCalc> {
|
|||||||
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
Text(
|
||||||
|
"~ ${double.parse(total).ceil()}.00",
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 30,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
|
),
|
||||||
|
),
|
||||||
const Divider(),
|
const Divider(),
|
||||||
if (splitBillController.text == "Yes")
|
if (splitBillController.text == "Yes")
|
||||||
Row(
|
Row(
|
||||||
@@ -226,6 +235,16 @@ class _TipCalcState extends State<TipCalc> {
|
|||||||
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
if (splitBillController.text == "Yes")
|
||||||
|
Text(
|
||||||
|
"~ ${double.parse(amountPerPerson).ceil()}.00",
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 30,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
|
),
|
||||||
|
),
|
||||||
// if (splitBillController.text == "Yes") const Divider(),
|
// if (splitBillController.text == "Yes") const Divider(),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user