Script.fromJson constructor
Implementation
factory Script.fromJson(String name, dynamic json, {List<String>? parents}) {
final possibleCommands = tryReadListOrString(json);
if (possibleCommands != null) {
return Script.defaults(
name: name,
commands: possibleCommands,
parents: parents,
);
}
return _$ScriptFromJson(
{
...?json as Map?,
Keys.name: name,
if (parents != null) Keys.parents: parents,
},
);
}