fromJson method

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

Implementation

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

  switch (json) {
    case 'longestLine':
      return TextWidthBasis.longestLine;

    case 'parent':
      return TextWidthBasis.parent;
  }

  throw 'Unsuported_Json_Value';
}