tryParseStringToDouble function

double? tryParseStringToDouble(
  1. String? value
)

Parses a string to a double.

The value parameter is the string to parse.

Returns the parsed double, or null if the string could not be parsed. TODO: move to t_helpers

Implementation

double? tryParseStringToDouble(String? value) {
  if (value is String && value.isNotEmpty) {
    final dValue = double.tryParse(value);

    if (dValue is double) return dValue;
  }

  return null;
}