pty 0.0.1 copy "pty: ^0.0.1" to clipboard
pty: ^0.0.1 copied to clipboard

outdated

Pty for Dart and Flutter. Provides the ability to create processes with pseudo terminal file descriptors.

example/pty_example.dart

import 'package:pty/pty.dart';

void main() async {
  final pty = Pty();

  pty.resize(50, 20);

  final proc = pty.exec(
    './test.sh',
    workingDirectory: '.',
    arguments: [],
  );

  var count = 1;
  while (true) {
    final data = await pty.read();

    if (data != null) {
      count += data.length;
      print('count ${count}');
    } else {
      break;
    }
  }

  await proc.wait();

  print('kill');
  proc.kill();
}
7
likes
0
pub points
45%
popularity

Publisher

unverified uploader

Pty for Dart and Flutter. Provides the ability to create processes with pseudo terminal file descriptors.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

executorservices, ffi

More

Packages that depend on pty