getBoxFit method

BoxFit? getBoxFit(
  1. String? value
)

Implementation

BoxFit? getBoxFit(String? value) {
  if (value == null || value.isEmpty) {
    return null;
  }
  switch (value) {
    case "none":
      return BoxFit.none;
    case "fill":
      return BoxFit.fill;
    case "contain":
      return BoxFit.contain;
    case "cover":
      return BoxFit.cover;
    case "fitHeight":
      return BoxFit.fitHeight;
    case "fitWidth":
      return BoxFit.fitWidth;
    case "scaleDown":
      return BoxFit.scaleDown;
    default:
      return null;
  }
}