length property
int
get
length
Current written length (number of valid bytes).
Implementation
int get length => _length;
set
length
(int value)
Updates the current written length.
Increasing the length ensures enough capacity but does not zero-fill the new bytes.
Implementation
set length(int value) {
final oldValue = _length;
if (value > oldValue) {
ensureAvailableLength(value - oldValue);
}
_length = value;
}