Logging large strings from Flutter

前端 未结 8 1961
天涯浪人
天涯浪人 2020-12-17 07:50

I\'m trying to build a Flutter App and learning Dart in the process, but I\'m getting kind of frustrated when debugging. I have fetched a resource from an API and now I want

8条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-17 08:04

    How about using the Flutter log from the dart: developer library. This does not seem to be the maximum length limit like print() or debugPrint(). This is the only solution that seems to work fine. Try it as below:

    log(reallyReallyLongText)
    

    The output will be the entire long string without breaks and prefixed with [log]

提交回复
热议问题