parseBoxFit function
Implementation
BoxFit? parseBoxFit(String? boxFitString) {
if (boxFitString == null) {
return null;
}
switch (boxFitString) {
case 'fill':
return BoxFit.fill;
case 'contain':
return BoxFit.contain;
case 'cover':
return BoxFit.cover;
case 'fitWidth':
return BoxFit.fitWidth;
case 'fitHeight':
return BoxFit.fitHeight;
case 'none':
return BoxFit.none;
case 'scaleDown':
return BoxFit.scaleDown;
}
return null;
}