modelToViewValue method

  1. @override
DigitDOBAge? modelToViewValue(
  1. DateTime? modelValue
)

Returns the value that must be supplied to the UI widget.

Converts value from control data type to UI data type.

Implementation

@override
DigitDOBAge? modelToViewValue(DateTime? modelValue) {
  if (modelValue == null) {
    return null;
  } else {
    return DigitDateUtils.calculateAge(modelValue);
  }
}