parse static method

Currency parse(
  1. String value
)

Returns Currency from value string.

Return 0 when value has format error

Implementation

static Currency parse(String value) {
  try {
    return Currency._fromValue(_parse(value));
  } on FormatException {
    return Currency();
  }
}