toJson method
Implementation
@override
String? toJson(DecorationPosition? object) {
if (object == null) return null;
switch (object) {
case DecorationPosition.background:
return 'background';
case DecorationPosition.foreground:
return 'foreground';
}
}