print function
- Object?object
Prints an object to the console.
On the web,object is converted to a string and that string is output tothe web console usingconsole.log.
On native (non-Web) platforms,object is converted to a string and thatstring is terminated by a line feed ('\n', U+000A) and written tostdout. On Windows, the terminating line feed, and any line feeds in thestring representation ofobject, are output using the Windows lineterminator sequence of ('\r\n', U+000D + U+000A).
Calls toprint can be intercepted byZone.print.
Implementation
void print(Object? object) { String line = "$object"; var toZone = printToZone; if (toZone == null) { printToConsole(line); } else { toZone(line); }}