debugNameForSlot method Null safety

  1. @protected
String debugNameForSlot(
  1. S 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 on slot it it is an Enum value and toString if it is not.


String debugNameForSlot(S slot) {
  if (slot is Enum) {
  return slot.toString();