W3cubDocs

/Dart 2

setUint16 method

void setUint16 (int byteOffset, int value, [ Endian endian = Endian.big ])

Sets the two bytes starting at the specified byteOffset in this object to the unsigned binary representation of the specified value, which must fit in two bytes.

In other words, value must be between 0 and 216 - 1, inclusive.

Throws RangeError if byteOffset is negative, or byteOffset + 2 is greater than the length of this object.

Implementation

void setUint16(int byteOffset, int value, [Endian endian = Endian.big]);

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dart.dev/stable/2.5.0/dart-typed_data/ByteData/setUint16.html