1616
1717** xterm.dart** is a fast and fully-featured terminal emulator for Flutter applications, with support for mobile and desktop platforms.
1818
19- > This package requires Flutter version >=2 .0.0
19+ > This package requires Flutter version >=3 .0.0
2020
2121## Screenshots
2222
4747- ✂️ ** Customizable**
4848- ✔ ** Frontend independent** : The terminal core can work without flutter frontend.
4949
50+ ** What's new in 3.0.0:**
51+
52+ - 📱 Enhanced support for ** mobile** platforms.
53+ - ⌨️ Integrates with Flutter's ** shortcut** system.
54+ - 🎨 Allows changing ** theme** at runtime.
55+ - 💪 Better ** performance** . No tree rebuilds anymore.
56+ - 🈂️ Works with ** IMEs** .
57+
5058## Getting Started
5159
5260** 1.** Add this to your package's pubspec.yaml file:
5361
5462``` yml
5563dependencies :
5664 ...
57- xterm : ^2 .2.0-pre
65+ xterm : ^3 .2.6
5866` ` `
5967
6068**2.** Create the terminal:
@@ -65,17 +73,17 @@ import 'package:xterm/xterm.dart';
6573terminal = Terminal();
6674```
6775
68- To listen for input, add an onInput handler :
76+ Listen to user interaction with the terminal by simply adding a ` onOutput ` callback :
6977
7078``` dart
71- terminal = Terminal(onInput: onInput );
79+ terminal = Terminal();
7280
73- void onInput(String input ) {
74- print('input : $input ');
81+ terminal.onOutput = (output ) {
82+ print('output : $output ');
7583}
7684```
7785
78- ** 3.** Create the view, then attach the terminal to the view:
86+ ** 3.** Create the view, attach the terminal to the view:
7987
8088``` dart
8189import 'package:xterm/flutter.dart';
@@ -91,12 +99,17 @@ terminal.write('Hello, world!');
9199
92100** Done!**
93101
94- ## Example
102+ ## More examples
95103
96- - ** local pty example** : [ Terminal Lite] ( https://github.com/TerminalStudio/xterm.dart )
104+ - Write a simple terminal in ~ 100 lines of code:
105+ https://github.com/TerminalStudio/xterm.dart/blob/master/example/lib/main.dart
97106
98- - ** ssh example** : https://github.com/TerminalStudio/xterm.dart/blob/master/example/lib/ssh.dart
99- <img width =" 400px " src =" https://raw.githubusercontent.com/TerminalStudio/xterm.dart/master/media/example-ssh.png " >
107+ - Write a SSH client in ~ 100 lines of code with [ dartssh2] :
108+ https://github.com/TerminalStudio/xterm.dart/blob/master/example/lib/ssh.dart
109+
110+ <img width =" 400px " src =" https://raw.githubusercontent.com/TerminalStudio/xterm.dart/master/media/example-ssh.png " >
111+
112+ For a complete project built with xterm.dart, check out [ TerminalStudio] .
100113
101114## Features and bugs
102115
@@ -106,4 +119,7 @@ Contributions are always welcome!
106119
107120## License
108121
109- This project is licensed under an MIT license.
122+ This project is licensed under an MIT license.
123+
124+ [ dartssh2 ] : https://pub.dev/packages/dartssh2
125+ [ TerminalStudio ] : https://github.com/TerminalStudio/studio
0 commit comments