toJson method

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

Implementation

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

  switch (value) {
    case TextWidthBasis.longestLine:
      return 'longestLine';
      break;
    case TextWidthBasis.parent:
      return 'parent';
      break;
  }

  throw 'Json_Unsuported_Value';
}