labelForEvent method

String labelForEvent(
  1. Type event
)

Returns a transition label for use on exported diagrams. The label takes the standard UML2 form of:

transition[condition]/sideeffect

Implementation

String labelForEvent(Type event) {
  final buf = StringBuffer()..write(event.toString());

  if (conditionLabel != null) {
    buf.write(' [$conditionLabel]');
  }
  if (sideEffectLabel != null) {
    buf.write('/$sideEffectLabel');
  }
  return buf.toString();
}