fromJson method

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

Implementation

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

  switch (json) {
    case 'italic':
      return FontStyle.italic;

    case 'normal':
      return FontStyle.normal;
  }

  throw 'Unsuported_Json_Value';
}