toJson method

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

Implementation

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

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

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