Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
S
second_display
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dio Maulana
second_display
Commits
17ca4ce9
Commit
17ca4ce9
authored
Apr 08, 2022
by
Dio Maulana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
parsing double to int
parent
2cf640b1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
10 deletions
+16
-10
orders.dart
lib/ui/orders.dart
+16
-10
No files found.
lib/ui/orders.dart
View file @
17ca4ce9
...
...
@@ -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
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment