-
-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This now allows us to show the required exp. materials in the calculator
- Loading branch information
Showing
18 changed files
with
345 additions
and
131 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions
10
lib/domain/models/items/item_experience.dart → ...n/models/items/item_experience_model.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import 'package:intl/intl.dart'; | ||
|
||
class CurrencyUtils { | ||
static String formatNumber( | ||
int amount, { | ||
int decimalDigits = 0, | ||
bool symbolToTheRight = true, | ||
String thousandSeparator = '.', | ||
String decimalSeparator = ',', | ||
}) { | ||
return _refineSeparator( | ||
amount, | ||
decimalDigits, | ||
thousandSeparator, | ||
decimalSeparator, | ||
); | ||
} | ||
|
||
static String _baseFormat( | ||
int amount, | ||
int decimalDigits, | ||
) => | ||
NumberFormat.currency( | ||
symbol: '', | ||
decimalDigits: decimalDigits, | ||
locale: 'en_US', | ||
).format(amount); | ||
|
||
static String _refineSeparator( | ||
int amount, | ||
int decimalDigits, | ||
String thousandSeparator, | ||
String decimalSeparator, | ||
) => | ||
_baseFormat(amount, decimalDigits) | ||
.replaceAll(',', '(,)') | ||
.replaceAll('.', '(.)') | ||
.replaceAll('(,)', thousandSeparator) | ||
.replaceAll('(.)', decimalSeparator); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.