boxFit static method

BoxFit boxFit(
  1. String? fit
)

Implementation

static BoxFit boxFit(String? fit) {
  switch (fit) {
    case 'contain':
      return BoxFit.contain;
    case 'fill':
      return BoxFit.fill;
    case 'fitHeight':
      return BoxFit.fitHeight;
    case 'fitWidth':
      return BoxFit.fitWidth;
    case 'scaleDown':
      return BoxFit.scaleDown;
    default:
      return BoxFit.cover;
  }
}