toJson method

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

Implementation

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

  if (object == TextDecoration.lineThrough) {
    return 'lineThrough';
  } else if (object == TextDecoration.none) {
    return 'none';
  } else if (object == TextDecoration.overline) {
    return 'overline';
  } else if (object == TextDecoration.underline) {
    return 'underline';
  }

  throw 'Json_Unsuported_Value';
}