toJson method

  1. @override
String? toJson(
  1. DecorationPosition? object
)
override

Implementation

@override
String? toJson(DecorationPosition? object) {
  if (object == null) return null;

  switch (object) {
    case DecorationPosition.background:
      return 'background';
    case DecorationPosition.foreground:
      return 'foreground';
  }
}