how to print log in flutter windows vc++ code?

Viewed 92

I write flutter to write a windows software, so I want to add same logs which shows in console in fultter windows vc++ code, I used printf and std::out to print logs, but android studio console not any print log, how to add logs in flutter windows vc++ code?

1 Answers

If you simply want to print text to the console you can use print('Text').

But if you want to access the advanced features of the DevTools console you need to use the Console class from dart:html: Console.log('Text')

Example:-

Use print() to print a string to the console of your browser:

import 'dart:html';

main() {
  var value = querySelector('input').value;
  print('The value of the input is: $value');
}
Related