|
@@ -27,6 +27,7 @@ class TerminalView extends StatefulWidget {
|
|
|
this.controller,
|
|
this.controller,
|
|
|
this.theme = TerminalThemes.defaultTheme,
|
|
this.theme = TerminalThemes.defaultTheme,
|
|
|
this.textStyle = const TerminalStyle(),
|
|
this.textStyle = const TerminalStyle(),
|
|
|
|
|
+ this.textScaleFactor,
|
|
|
this.padding,
|
|
this.padding,
|
|
|
this.scrollController,
|
|
this.scrollController,
|
|
|
this.autoResize = true,
|
|
this.autoResize = true,
|
|
@@ -58,6 +59,11 @@ class TerminalView extends StatefulWidget {
|
|
|
/// The style to use for painting characters.
|
|
/// The style to use for painting characters.
|
|
|
final TerminalStyle textStyle;
|
|
final TerminalStyle textStyle;
|
|
|
|
|
|
|
|
|
|
+ /// The number of font pixels for each logical pixel. If null, will use the
|
|
|
|
|
+ /// [MediaQueryData.textScaleFactor] obtained from [MediaQuery], or 1.0 if
|
|
|
|
|
+ /// there is no [MediaQuery] in scope.
|
|
|
|
|
+ final double? textScaleFactor;
|
|
|
|
|
+
|
|
|
/// Padding around the inner [Scrollable] widget.
|
|
/// Padding around the inner [Scrollable] widget.
|
|
|
final EdgeInsets? padding;
|
|
final EdgeInsets? padding;
|
|
|
|
|
|
|
@@ -212,7 +218,8 @@ class TerminalViewState extends State<TerminalView> {
|
|
|
padding: MediaQuery.of(context).padding,
|
|
padding: MediaQuery.of(context).padding,
|
|
|
autoResize: widget.autoResize,
|
|
autoResize: widget.autoResize,
|
|
|
textStyle: widget.textStyle,
|
|
textStyle: widget.textStyle,
|
|
|
- textScaleFactor: MediaQuery.textScaleFactorOf(context),
|
|
|
|
|
|
|
+ textScaleFactor:
|
|
|
|
|
+ widget.textScaleFactor ?? MediaQuery.textScaleFactorOf(context),
|
|
|
theme: widget.theme,
|
|
theme: widget.theme,
|
|
|
focusNode: _focusNode,
|
|
focusNode: _focusNode,
|
|
|
cursorType: widget.cursorType,
|
|
cursorType: widget.cursorType,
|