resolveBoxFit static method
Implementation
static BoxFit resolveBoxFit(String fit) {
switch (fit) {
case 'contain':
return BoxFit.contain;
case 'cover':
return BoxFit.cover;
case 'none':
return BoxFit.none;
case 'scaleDown':
case 'scale-down':
return BoxFit.scaleDown;
case 'fitWidth':
case 'fit-width':
return BoxFit.fitWidth;
case 'fitHeight':
case 'fit-height':
return BoxFit.fitHeight;
case 'fill':
default:
return BoxFit.fill;
}
}