CustomField.fromYaml constructor
CustomField.fromYaml(
- Map yaml
Creates a CustomField instance from a YAML map.
The YAML map should contain 'name' and 'type' keys.
Example:
final yaml = {'name': 'enableDarkMode', 'type': 'bool'};
final field = CustomField.fromYaml(yaml);
Implementation
factory CustomField.fromYaml(Map<dynamic, dynamic> yaml) {
return CustomField(
name: yaml['name'] as String,
type: yaml['type'] as String,
);
}