decode static method
Implementation
static FontDesign? decode(dynamic json) {
if (json == null) {
return null;
}
if (json is! String) {
return null;
}
switch (json) {
case 'DEFAULT':
return FontDesign.DEFAULT;
case 'MONOSPACE':
return FontDesign.MONOSPACE;
case 'ROUNDED':
return FontDesign.ROUNDED;
case 'SERIF':
return FontDesign.SERIF;
default:
return FontDesign.UNKNOWN;
}
}