decode static method

ImageContentMode? decode(
  1. dynamic json
)

Implementation

static ImageContentMode? decode(dynamic json) {
  if (json == null) {
    return null;
  }
  if (json is! String) {
    return null;
  }

  switch (json) {
    case 'FIT':
      return ImageContentMode.FIT;
    case 'FILL':
      return ImageContentMode.FILL;
    default:
      return ImageContentMode.UNKNOWN;
  }
}