getIconData method
Retrieve a visualization of the statement category.
Implementation
Widget getIconData(double width) {
return switch (this) {
StatementCategory.variable => Icon(
Icons.data_object,
size: width,
color: Colors.green,
),
// const Text('(x)', style: TextStyle(fontSize: 14)),
StatementCategory.loop => Icon(
Icons.loop,
size: width,
color: Colors.blue,
),
StatementCategory.decisionStructure => Icon(
Icons.alt_route,
size: width,
color: Colors.red,
),
StatementCategory.other => Icon(
Icons.dashboard_outlined,
size: width,
color: Colors.purple,
),
};
}