AvailableGraphicsUnit.fromJson constructor
AvailableGraphicsUnit.fromJson(
- dynamic data
Creates a AvailableGraphicsUnit instance from a JSON representation.
Implementation
AvailableGraphicsUnit.fromJson(dynamic data) {
switch (data) {
case "Pixel":
case "Point":
case "Inch":
case "Millimeter":
_value = data;
break;
default:
throw Exception('Unknown enum value to decode: $data');
}
}