Code & Deploy
siGit Code
Git Hosting
Toggle menu
Code
Code Review
Models
Repos
Sign in
Sign in
@samitouri
/
QOSAMI-cakewallet
QOSAMI-cakewallet
/
cw_core
/
lib
/
format_amount.dart
Code
Commits
Issues
Pulls
Sessions
CI/CD
dev
dev
dart
8 lines
238 Bytes
Copy permalink
Copy
Raw
1
String
formatAmount
(
String
amount
)
{
2
if
((
!
amount
.
contains
(
'.'
))
&&
(
!
amount
.
contains
(
','
)))
{
3
return
amount
+
'.00'
;
4
}
else
if
((
amount
.
endsWith
(
'.'
))
||
(
amount
.
endsWith
(
','
)))
{
5
return
amount
+
'00'
;
6
}
7
return
amount
;
8
}