toJson method

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

Implementation

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

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

    case FontStyle.normal:
      return 'normal';
      break;
  }

  throw 'Json_Unsuported_Value';
}