formatByteBuffer function

String formatByteBuffer(
  1. ByteBuffer data
)

Implementation

String formatByteBuffer(ByteBuffer data) {
  final view = data.asUint8List();

  var str = '';
  for (var n in view) {
    final pad = n < 16 ? '0' : '';
    str += '0x$pad${n.toStringAsFixed(16)} ';
  }

  return str.substring(0, str.length - 1);
}