Definition.from constructor
Definition.from(
- dynamic input
Creates a Definition instance from a dynamic
input.
The input can be a Map, List or String.
Implementation
factory Definition.from(dynamic input) {
if (input is Map) {
final description = input[descriptionDefinitionKey] as String?;
final scripts = input[scriptsDefinitionKey] as dynamic;
return Definition(
description: description,
scripts: _toStringList(scripts),
);
} else {
return Definition(scripts: _toStringList(input));
}
}