createBlobStream method
Implementation
@override
TStream? createBlobStream(TField field, TBlobStreamMode mode) {
if (mode == TBlobStreamMode.bmRead) {
final buf = TValueBuffer();
if (!getFieldData(field, buf)) return null;
final v = buf.value;
final ms = TMemoryStream();
if (v is Uint8List) {
ms.loadFromBytes(v);
} else if (v is String) {
ms.loadFromBytes(v.codeUnits);
}
return ms;
} else {
// Write mode: returns the stream attached to the field value (already in fieldData once Post happens)
final ms = _WriteBackMemoryStream(this, field);
return ms;
}
}