Commit 17ca4ce9 authored by Dio Maulana's avatar Dio Maulana

parsing double to int

parent 2cf640b1
......@@ -101,6 +101,9 @@ class OrderPage extends StatelessWidget {
double.tryParse(detailOrder[i].total) ?? 0;
var amountEachOrderText =
formatCurrency().format(amountEachOrder);
var quantityDouble =
double.tryParse(detailOrder[i].quantity) ?? 0.0;
var quantityInt = quantityDouble.toInt();
return Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
......@@ -111,8 +114,7 @@ class OrderPage extends StatelessWidget {
listOforder(
context,
Alignment.centerLeft,
double.tryParse(detailOrder[i].quantity)
.toString() +
quantityInt.toString() +
" x " +
detailOrder[i].name),
listOforder(context, Alignment.centerRight,
......@@ -126,13 +128,17 @@ class OrderPage extends StatelessWidget {
// color: Colors.green,
height: MediaQuery.of(context).size.height *
0.02,
margin: EdgeInsets.only(
top:
MediaQuery.of(context).size.height *
0.000,
bottom:
MediaQuery.of(context).size.height *
0.001),
margin: (i == orderOptionDetail.length - 1)
? EdgeInsets.only(
bottom: MediaQuery.of(context)
.size
.height *
0.01)
: EdgeInsets.only(
bottom: MediaQuery.of(context)
.size
.height *
0.00),
child: Row(
children: [
listOforderOption(
......@@ -281,7 +287,7 @@ class OrderPage extends StatelessWidget {
Container listOforder(BuildContext context, Alignment align, String text) {
return Container(
// color: Colors.white,
height: MediaQuery.of(context).size.height * 0.06,
// height: MediaQuery.of(context).size.height * 0.06,
width: MediaQuery.of(context).size.width * 0.13,
child: Align(
alignment: align,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment