isNumberOrAmount static method

bool isNumberOrAmount(
  1. String term
)

Returns true if the String contains digits and delimiters (periods or commas) where delimiters are not at the start or end of the String.

Includes numbers with pre-fixes or suffixes

Implementation

static bool isNumberOrAmount(String term) =>
    RegExp(rNumbersAndAmounts).allMatches(term.trim()).length == 1;