'How to avoid printing Uint8List in Dart?
Uint8List's toString() method outputs the entire list of integers, which is generally very long and not helpful (as it's some binary data), and makes it difficult to find other information, when, for instance, printing a Map or List. It's not possible to override the toString() method with an extension, and it's apparently also not possible to subclass Uint8List to override it. I still need to use Uint8List, however, since many methods accept it. How can this type of object be made more print-friendly without, for instance, having to pick out the parts of the object that aren't Uint8List or make subclasses overriding toString() for every type (eg. Map or List) that prints its contents?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
