ExampleScenarioInstance.fromYaml constructor
ExampleScenarioInstance.fromYaml(
- dynamic yaml
Deserialize ExampleScenarioInstance
from a String or YamlMap
object
Implementation
factory ExampleScenarioInstance.fromYaml(
dynamic yaml,
) {
if (yaml is String) {
return ExampleScenarioInstance.fromJson(
yamlToJson(yaml),
);
} else if (yaml is YamlMap) {
return ExampleScenarioInstance.fromJson(
yamlMapToJson(yaml),
);
} else {
throw ArgumentError(
'ExampleScenarioInstance '
'cannot be constructed from the provided input. '
'It must be a YAML string or YAML map.',
);
}
}