|
@@ -42,6 +42,7 @@ class TerminalView extends StatefulWidget {
|
|
|
this.alwaysShowCursor = false,
|
|
this.alwaysShowCursor = false,
|
|
|
this.deleteDetection = false,
|
|
this.deleteDetection = false,
|
|
|
this.shortcuts,
|
|
this.shortcuts,
|
|
|
|
|
+ this.readOnly = false,
|
|
|
}) : super(key: key);
|
|
}) : super(key: key);
|
|
|
|
|
|
|
|
/// The underlying terminal that this widget renders.
|
|
/// The underlying terminal that this widget renders.
|
|
@@ -115,6 +116,9 @@ class TerminalView extends StatefulWidget {
|
|
|
/// of the terminal If not provided, [defaultTerminalShortcuts] will be used.
|
|
/// of the terminal If not provided, [defaultTerminalShortcuts] will be used.
|
|
|
final Map<ShortcutActivator, Intent>? shortcuts;
|
|
final Map<ShortcutActivator, Intent>? shortcuts;
|
|
|
|
|
|
|
|
|
|
+ /// True if no input should send to the terminal.
|
|
|
|
|
+ final bool readOnly;
|
|
|
|
|
+
|
|
|
@override
|
|
@override
|
|
|
State<TerminalView> createState() => TerminalViewState();
|
|
State<TerminalView> createState() => TerminalViewState();
|
|
|
}
|
|
}
|
|
@@ -219,6 +223,7 @@ class TerminalViewState extends State<TerminalView> {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
onKey: _onKeyEvent,
|
|
onKey: _onKeyEvent,
|
|
|
|
|
+ readOnly: widget.readOnly,
|
|
|
child: child,
|
|
child: child,
|
|
|
);
|
|
);
|
|
|
|
|
|