decodeFontStyle function

FontStyle? decodeFontStyle(
  1. String? name
)

Implementation

FontStyle? decodeFontStyle(String? name) {
  if (name == null) {
    return null;
  }

  switch (name) {
    case 'italic':
      return FontStyle.italic;
    case 'normal':
      return FontStyle.normal;
    default:
      return null;
  }
}