getParameters method

Set<AttributeParameter> getParameters()

Implementation

Set<AttributeParameter> getParameters() {
  final paramSet = <String>{};
  final paramTypeMap = <String, String>{};
  for (final textNode in entries.values) {
    paramSet.addAll(textNode.params);
    paramTypeMap.addAll(textNode.paramTypeMap);
  }
  paramSet.add(paramName);
  paramTypeMap[paramName] = context.enumName;
  if (rich) {
    final builderParam = '${paramName}Builder';
    paramSet.add(builderParam);
    paramTypeMap[builderParam] = 'InlineSpan Function(${context.enumName})';
  }
  return paramSet.map((param) {
    return AttributeParameter(
        parameterName: param, type: paramTypeMap[param] ?? 'Object');
  }).toSet();
}