tryParse static method
Parses source
as a decimal literal and returns its value as Decimal, or null if the parsing fails.
Implementation
static Decimal? tryParse(String source) {
try {
return Decimal.parse(source);
} on FormatException {
return null;
}
}