getIconData method

Widget getIconData(
  1. double width
)

Retrieve a visualization of the statement category.

Implementation

Widget getIconData(double width) {
  return switch (this) {
    StatementCategory.variable => Icon(
      Icons.data_object,
      size: width,
      color: ToolboxConfig.categoryColors[StatementCategory.variable],
    ),
    // const Text('(x)', style: TextStyle(fontSize: 14)),
    StatementCategory.loop => Icon(
      Icons.loop,
      size: width,
      color: ToolboxConfig.categoryColors[StatementCategory.loop],
    ),
    StatementCategory.decisionStructure => Icon(
      Icons.alt_route,
      size: width,
      color:
          ToolboxConfig.categoryColors[StatementCategory.decisionStructure],
    ),
    StatementCategory.function => Icon(
      Icons.alt_route,
      size: width,
      color: ToolboxConfig.categoryColors[StatementCategory.function],
    ),
    StatementCategory.other => Icon(
      Icons.dashboard_outlined,
      size: width,
      color: ToolboxConfig.categoryColors[StatementCategory.other],
    ),
  };
}