toJson method
Implementation
@override
Map<String, dynamic>? toJson(InputBorder? object) {
if (object == null) return null;
if (object is OutlineInputBorder) {
return {
'borderRadius':
const NullableBorderRadiusConverter().toJson(object.borderRadius),
'borderSide':
const NullableBorderSideConverter().toJson(object.borderSide),
'gapPadding': object.gapPadding,
'type': 'outline',
};
} else if (object is UnderlineInputBorder) {
return {
'borderRadius':
const NullableBorderRadiusConverter().toJson(object.borderRadius),
'borderSide':
const NullableBorderSideConverter().toJson(object.borderSide),
'type': 'underline',
};
}
throw 'Json_Unsuported_Value';
}