byte_array 0.1.4 byte_array: ^0.1.4 copied to clipboard
Byte array manipulation
example/byte_array_example.dart
import 'package:byte_array/byte_array.dart';
void main() {
final bytes = ByteArray(6);
bytes.writeFloat(33.6);
bytes.writeUnsignedShort(5);
print('length in bytes: ${bytes.length}');
bytes.offset = 0;
final float = bytes.readFloat();
print(float);
final short = bytes.readUnsignedShort();
print(short);
}