setAsBytes method

  1. @override
void setAsBytes(
  1. Uint8List aValue
)
override

Implementation

@override
void setAsBytes(Uint8List aValue) {
  Uint8List data;
  if (dataType == TFieldType.ftVarBytes || aValue.length >= getDataSize()) {
    data = aValue;
  } else {
    // ftBytes: right pad with #0 (original comment kept as-is)
    data = Uint8List(getDataSize());
    data.setRange(0, aValue.length, aValue);
  }
  setData(TValueBuffer(data), true);
}