fromJson method

  1. @override
TextOverflow? fromJson(
  1. String? json
)

Implementation

@override
TextOverflow? fromJson(String? json) {
  if (json == null) return null;

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

    case 'ellipsis':
      return TextOverflow.ellipsis;

    case 'fade':
      return TextOverflow.fade;

    case 'visible':
      return TextOverflow.visible;
  }

  throw 'Unsuported_Json_Value';
}