parseEnumProperty<T> function

T parseEnumProperty<T>(
  1. MetaObject context,
  2. Iterable<T> enumvalues,
  3. T defaultvalue,
  4. TreeNode node,
  5. String property
)

Implementation

T parseEnumProperty<T>(MetaObject context, Iterable<T> enumvalues,
    T defaultvalue, TreeNode node,String property) {
  String v = node.getValue(property);
  var r = getEnumFromString(enumvalues, node.getValue(property));
  if (r != null) {
    return r;
  }
  return defaultvalue;
}