toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  return {
    'name': name,
    'type': type?.name,
    'nullable': nullable,
    'defaultValue': defaultValue,
    'unique': unique,
    'comment': comment,
    'minLength': minLength,
    'maxLength': maxLength,
    'minValue': minValue,
    'maxValue': maxValue,
    if (defaultValueType != null)
      'defaultValueType': defaultValueType.toString().split('.').last,
    '_explicitlySet': _explicitlySet,
  };
}