getFloat method

double getFloat(
  1. int i
)

Returns the float value of the field at index i. If the field is not a valid float value will return -1.

Implementation

double getFloat(int i) {
  final field = getField(i);
  final value = double.tryParse(field);
  if (value == null) {
    error = 'invalid float value: $field';
    return -1;
  }
  return value;
}