How to fully dump / print variable to console in the Dart language?

后端 未结 8 1172
星月不相逢
星月不相逢 2021-01-03 20:37

Hey there I am searching for a function which is printing a dynamic variable as completely as possible to the console in Dart language.

In PHP for i

8条回答
  •  心在旅途
    2021-01-03 21:09

    dart:developer library has inspect function that allows debuggers to open an inspector on the object.

    To use it add:

    import 'dart:developer';
    

    And the you can see your inspected variable/object in console with:

    inspect(myVar);
    

提交回复
热议问题