round up total and split per person

This commit is contained in:
2025-01-27 12:46:20 +02:00
parent 14c901f22e
commit 7e3a9c43aa

View File

@@ -191,6 +191,15 @@ class _TipCalcState extends State<TipCalc> {
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(),
if (splitBillController.text == "Yes")
Row(
@@ -226,6 +235,16 @@ class _TipCalcState extends State<TipCalc> {
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(),
],
),