isNumeric function

bool isNumeric(
  1. String str
)

Checks if the string represents a valid number.

Uses Dart's double.tryParse to determine if the string is number-like. Supports integers, floats, and negative numbers.

Example:

isNumeric('123'); // true
isNumeric('12.34'); // true
isNumeric('-42'); // true
isNumeric('abc'); // false

Implementation

bool isNumeric(String str) => _isNumeric(str);