write method
Write data to the pseudo-terminal.
Implementation
@override
void write(Uint8List data) {
final buf = malloc<Int8>(data.length);
buf.asTypedList(data.length).setAll(0, data);
pty_library.pty_write(_handle, buf.cast(), data.length);
malloc.free(buf);
}