toJSON method

  1. @override
String toJSON()
override

Implementation

@override
String toJSON() {
  if (isRequired && _value == null) {
    throw Exception("Field is required but has not been set a value");
  }
  return _value?.toIso8601String() ?? "";
}