Backend.fromJson constructor
Backend.fromJson(
- Object? j
Implementation
factory Backend.fromJson(Object? j) {
final json = j as Map<String, Object?>;
return Backend(
rules: switch (json['rules']) {
null => [],
List<Object?> $1 => [for (final i in $1) BackendRule.fromJson(i)],
_ => throw const FormatException('"rules" is not a list'),
},
);
}