debugNameForSlot method

  1. @protected
String debugNameForSlot(
  1. SlotType slot
)

Returns the debug name for a given slot.

This method is called by debugDescribeChildren for each slot that is currently occupied by a child to obtain a name for that slot for debug outputs.

The default implementation calls EnumName.name on slot if it is an Enum value and toString if it is not.

Implementation

@protected
String debugNameForSlot(SlotType slot) {
  if (slot is Enum) {
    return slot.name;
  }
  return slot.toString();
}