asBytes property

Uint8List? get asBytes

Implementation

Uint8List? get asBytes {
  if (isNull) return null;
  final v = _value;
  if (v is Uint8List) return v;
  if (v is List<int>) return Uint8List.fromList(v);
  if (v is String) return Uint8List.fromList(v.codeUnits); // BytesOf
  // todo: conversion from other variant types to TBytes (original comment kept as-is)
  return null;
}
set asBytes (Uint8List? aValue)

Implementation

set asBytes(Uint8List? aValue) {
  _dataType = TFieldType.ftVarBytes;
  value = aValue;
}