AutoSizeMode.fromJson constructor

AutoSizeMode.fromJson(
  1. dynamic data
)

Creates a AutoSizeMode instance from a JSON representation.

Implementation

AutoSizeMode.fromJson(dynamic data) {
  switch (data) {
    case "None":
    case "Nearest":
    case "Interpolation":
      _value = data;
      break;
    default:
      throw Exception('Unknown enum value to decode: $data');
  }
}