mirror of
https://github.com/inventree/inventree-app.git
synced 2026-10-08 08:07:09 +00:00
Display non-field errors as returned from the server
This commit is contained in:
1 parent
b7f9f1c55f
commit
2886f7c930
4 files changed
+87
-20
No files matched your search
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* A set of helper functions to reduce boilerplate code
|
||||
*/
|
||||
|
||||
/*
|
||||
* Simplify a numerical value into a string,
|
||||
* supressing trailing zeroes
|
||||
*/
|
||||
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);
|
||||
}
|
||||
Reference in new issue
Block a user