print method - Zone class - dart:async library (original) (raw)
print abstract method
void print(
- String line )
Prints the given line
.
The global print
function delegates to the current zone's printfunction which makes it possible to intercept printing.
Example:
import 'dart:async';
main() {
runZoned(() {
// Ends up printing: "Intercepted: in zone".
print("in zone");
}, zoneSpecification: new ZoneSpecification(
print: (Zone self, ZoneDelegate parent, Zone zone, String line) {
parent.print(zone, "Intercepted: $line");
}));
}
Implementation
void print(String line);