toString method

  1. @override
String toString ()
override

We are more concerned about data field.

Implementation

@override
String toString() {
  if (data is Map) {
    return json.encode(data);
  }
  return data.toString();
}