viewToModelValue method

  1. @override
double? viewToModelValue(
  1. String? viewValue
)
override

Returns the value that must be supplied to the control.

Converts value from UI data type to control data type.

Implementation

@override
double? viewToModelValue(String? viewValue) {
  return (viewValue == '' || viewValue == null)
      ? null
      : double.tryParse(viewValue);
}