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