UcumDecimal.fromString constructor

UcumDecimal.fromString(
  1. String? value, [
  2. int? precision
])

Implementation

UcumDecimal.fromString(String? value, [int? precision]) {
  if (value != null) {
    value = value.toLowerCase();
    if (value.contains('e')) {
      setValueScientific(value);
    } else {
      setValueUcumDecimal(value);
    }
  }
  if (precision != null) {
    this.precision = precision;
  }
}