Skip to content

Commit 04c9eef

Browse files
committed
fix: remove createSpace methods in ask renderers
1 parent 5810e28 commit 04c9eef

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# 2.2.2
2+
- Remove `createSpace` method in `ask` component
3+
14
# 2.2.1
25
- The ask component disappeared after the validation stage
36
- Calling `createSpace` method in all rendering cases for `ask` component

lib/src/application/components/ask.dart

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ final class Ask<T> with TerminalTools implements Component<Future<T>> {
4343

4444
@override
4545
Future<T> handle() {
46+
createSpace(_terminal, 1);
4647
saveCursorPosition();
4748

4849
_defaultRendering();
@@ -85,7 +86,6 @@ final class Ask<T> with TerminalTools implements Component<Future<T>> {
8586
SetStyles(Style.foreground(Color.brightBlack)),
8687
]);
8788

88-
createSpace(_terminal, 1);
8989
stdout.write(buffer.toString());
9090
}
9191

@@ -114,7 +114,6 @@ final class Ask<T> with TerminalTools implements Component<Future<T>> {
114114
SetStyles.reset,
115115
]);
116116

117-
createSpace(_terminal, 2);
118117
stdout.write(buffer.toString());
119118

120119
stdout.writeAnsiAll([
@@ -146,7 +145,7 @@ final class Ask<T> with TerminalTools implements Component<Future<T>> {
146145
SetStyles.reset,
147146
AsciiControl.lineFeed,
148147
]);
149-
createSpace(_terminal, 1);
148+
150149
stdout.write(buffer.toString());
151150

152151
_completer.complete(response as T);

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: commander_ui
22
description: Commander is a Dart library for creating user interfaces within the terminal.
3-
version: 2.2.1
3+
version: 2.2.2
44
repository: https://github.com/LeadcodeDev/commander
55

66
topics:

0 commit comments

Comments
 (0)