You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following code demonstrates that the length of the Uint8List returned by ByteBuffer.asUint8List() has an unexpected value. Its value is perhaps related to the allocation size of the ByteBuffer, but does not equal the amount of bytes in the ByteBuffer.
import 'dart:typed_data';
import 'package:typed_data/typed_buffers.dart';
void main() {
Uint8List ul = Uint8List(1);
var b = Uint8Buffer();
for (int i = 0; i < 10; i++) {
b.addAll(ul);
print("${b.lengthInBytes}, ${b.buffer.asUint8List().length}");
}
}
The following code demonstrates that the length of the
Uint8List
returned byByteBuffer.asUint8List()
has an unexpected value. Its value is perhaps related to the allocation size of the ByteBuffer, but does not equal the amount of bytes in the ByteBuffer.will produce:
Dart SDK version: 3.3.0 (stable) (Tue Feb 13 10:25:19 2024 +0000) on "macos_arm64".
pubspec.lock:
The text was updated successfully, but these errors were encountered: