fromJson static method

PatchbayPlaneWire fromJson(
  1. Object? value, {
  2. String path = r'$',
})

Decodes a value at path, rejecting unknown values.

Implementation

static PatchbayPlaneWire fromJson(Object? value, {String path = r'$'}) {
  final wire = _wireString(value, path);
  for (final candidate in values) {
    if (candidate.name == wire) return candidate;
  }
  throw FormatException('$path has unknown PatchbayPlaneWire: $wire');
}