CodeLocation.fromJson constructor

CodeLocation.fromJson(
  1. dynamic data
)

Creates a CodeLocation instance from a JSON representation.

Implementation

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