ChecksumValidation.fromJson constructor

ChecksumValidation.fromJson(
  1. dynamic data
)

Creates a ChecksumValidation instance from a JSON representation.

Implementation

ChecksumValidation.fromJson(dynamic data) {
  switch (data) {
    case "Default":
    case "On":
    case "Off":
      _value = data;
      break;
    default:
      throw Exception('Unknown enum value to decode: $data');
  }
}