mirror of
https://github.com/inventree/inventree-app.git
synced 2025-06-16 04:05:28 +00:00
Bump version to 0.12.3 (#382)
* Bump version to 0.12.3 * Updates for ios * Fix for float / decimal field * Cleanup simpleNumberString * Increment build number
This commit is contained in:
@ -58,10 +58,17 @@ void debug(dynamic msg) {
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Simplify string representation of a floating point value
|
||||
* Basically, don't display fractional component if it is an integer
|
||||
*/
|
||||
String simpleNumberString(double number) {
|
||||
// Ref: https://stackoverflow.com/questions/55152175/how-to-remove-trailing-zeros-using-dart
|
||||
|
||||
return number.toStringAsFixed(number.truncateToDouble() == number ? 0 : 1);
|
||||
if (number.toInt() == number) {
|
||||
return number.toInt().toString();
|
||||
} else {
|
||||
return number.toString();
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user