fromJson method

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

Implementation

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

  switch (json) {
    case 'ltr':
      return TextDirection.ltr;

    case 'rtl':
      return TextDirection.rtl;
  }

  throw 'Unsuported_Json_Value';
}