objectToString static method

String objectToString(
  1. dynamic o
)

Implementation

static String objectToString(dynamic o) {
  if (o == null) {
    return '';
  } else if (o is String) {
    return o;
  } else if (o is DOMNode) {
    return o.buildHTML(buildTemplates: false);
  } else if (o is Iterable) {
    return o.map(objectToString).join('');
  } else if (o is Map) {
    return o.entries
        .map((e) => '${objectToString(e.key)}: ${objectToString(e.value)}')
        .join('');
  } else if (o is Iterable) {
    return o.map(objectToString).join('');
  } else {
    return o.toString();
  }
}