mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2025-02-22 12:30:40 +00:00

* updated pub version * added lint * --code=always_use_package_imports * dart fixes * format * other lints
19 lines
399 B
Dart
19 lines
399 B
Dart
extension SignedString on num {
|
|
String toStringSigned() {
|
|
if (this > 0) {
|
|
return "+${toString()}";
|
|
} else {
|
|
return toString();
|
|
}
|
|
}
|
|
}
|
|
|
|
extension SignedStringDouble on double {
|
|
String toStringSignedAsFixed(int fractionDigits) {
|
|
if (this > 0) {
|
|
return "+${toStringAsFixed(fractionDigits)}";
|
|
} else {
|
|
return toStringAsFixed(fractionDigits);
|
|
}
|
|
}
|
|
}
|