getValue method

bool getValue(
  1. TValueBuffer aValue
)

Implementation

bool getValue(TValueBuffer aValue) {
  final buf = TValueBuffer();
  final result = getData(buf, true);
  if (result) {
    final v = buf.value;
    if (v is Uint8List) {
      aValue.value = v;
    } else if (v is List<int>) {
      aValue.value = Uint8List.fromList(v);
    } else if (v is String) {
      aValue.value = Uint8List.fromList(v.codeUnits);
    } else {
      aValue.value = Uint8List(0);
    }
  }
  return result;
}