toJson method

  1. @override
String? toJson(
  1. TextOverflow? value
)
override

Implementation

@override
String? toJson(TextOverflow? value) {
  if (value == null) return null;

  switch (value) {
    case TextOverflow.clip:
      return 'clip';
      break;

    case TextOverflow.ellipsis:
      return 'ellipsis';
      break;

    case TextOverflow.fade:
      return 'fade';
      break;

    case TextOverflow.visible:
      return 'visible';
      break;
  }

  throw 'Json_Unsuported_Value';
}