fromJson method
Implementation
@override
BoxFit? fromJson(String? json) {
if (json == null) return null;
switch (json) {
case 'contain':
return BoxFit.contain;
case 'cover':
return BoxFit.cover;
case 'fill':
return BoxFit.fill;
case 'fitHeight':
return BoxFit.fitHeight;
case 'fitWidth':
return BoxFit.fitWidth;
case 'none':
return BoxFit.none;
case 'scaleDown':
return BoxFit.scaleDown;
}
throw 'Unsuported_Json_Value';
}