Метод print
- String line
Выводит заданную line.
Глобальная функция print делегирует вызов функции print текущей зоны, что позволяет перехватить вывод.
Пример:
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");
}));
} Реализация
void print(String line);
© 2012 the Dart project authors
Licensed under the BSD 3-Clause "New" or "Revised" License.
https://api.dart.dev/stable/2.18.5/dart-async/Zone/print.html