printDebug<K, V> method

void printDebug<K, V>({
  1. String label = 'Map',
  2. String separator = ': ',
  3. String indent = ' ',
})

debug print the map with label and separator. label is the label for the map. separator is the separator between key and value. indent is the indent for each line.

Implementation

void printDebug<K, V>({
  String label = 'Map',
  String separator = ': ',
  String indent = '  ',
}) {
  final sb = StringBuffer();
  sb.writeln('$label:');
  for (final key in keys) {
    sb.writeln('$indent$key$separator${this[key]}');
  }
  debugPrint(sb.toString());
}