toString method

  1. @override
String toString()
override

Convert an Array object to a String representation

Examples

print(Array([1, 2, 3]));

/* output:
Array([1.0, 2.0, 3.0])
*/

var str = Array([1.0, 2.0, 3.0]).toString();

print(str);

/* output:
Array([1.0, 2.0, 3.0])
*/

Implementation

@override
String toString() {
  var str = IterableBase.iterableToFullString(this, '[', ']');
  return '\n  Array($str)';
}