toJson method
Implementation
@override
String? toJson(FontWeight? object) {
if (object == null) return null;
switch (object) {
// case FontWeight.bold:
// return 'bold';
// break;
// case FontWeight.normal:
// return 'normal';
// break;
case FontWeight.w100:
return 'w100';
case FontWeight.w200:
return 'w200';
case FontWeight.w300:
return 'w300';
case FontWeight.w400:
return 'w400';
case FontWeight.w500:
return 'w500';
case FontWeight.w600:
return 'w600';
case FontWeight.w700:
return 'w700';
case FontWeight.w800:
return 'w800';
case FontWeight.w900:
return 'w900';
}
throw 'Json_Unsuported_Value';
}