File tree Expand file tree Collapse file tree 5 files changed +22
-3
lines changed Expand file tree Collapse file tree 5 files changed +22
-3
lines changed Original file line number Diff line number Diff line change
1
+ # 2.2.3
2
+ - Add missing properties ` select ` in select commander entry
3
+ - Fix multiple behaviour instead of single behaviour in ` checkbox ` component
4
+ - Enhance ` info ` logger method
5
+
1
6
# 2.2.2
2
7
- Remove ` createSpace ` method in ` ask ` component
3
8
Original file line number Diff line number Diff line change @@ -148,7 +148,11 @@ final class Checkbox<T>
148
148
149
149
void _onSelect () {
150
150
if (_multiple) {
151
- _selectedOptions.add (_currentIndex);
151
+ if (_selectedOptions.contains (_currentIndex)) {
152
+ _selectedOptions.remove (_currentIndex);
153
+ } else {
154
+ _selectedOptions.add (_currentIndex);
155
+ }
152
156
} else {
153
157
_selectedOptions.clear ();
154
158
_selectedOptions.add (_currentIndex);
Original file line number Diff line number Diff line change @@ -75,10 +75,12 @@ class Commander with TerminalTools {
75
75
{T ? defaultValue,
76
76
required List <T > options,
77
77
String placeholder = '' ,
78
+ int displayCount = 5 ,
78
79
String Function (T )? onDisplay}) =>
79
80
Select <T >(_terminal,
80
81
message: message,
81
82
defaultValue: defaultValue,
83
+ displayCount: displayCount,
82
84
options: options,
83
85
placeholder: placeholder,
84
86
onDisplay: onDisplay)
Original file line number Diff line number Diff line change @@ -36,7 +36,15 @@ final class CommanderTheme {
36
36
}
37
37
38
38
String infoFormatter (String ? message) {
39
- final buffer = StringBuffer ()..writeAnsi (Print (' $message ' ));
39
+ final buffer = StringBuffer ()
40
+ ..writeAnsiAll ([
41
+ SetStyles (Style .foreground (Color .green)),
42
+ Print ('ℹ' ),
43
+ SetStyles .reset,
44
+ Print (' $message ' ),
45
+ SetStyles .reset,
46
+ ]);
47
+
40
48
return buffer.toString ();
41
49
}
42
50
Original file line number Diff line number Diff line change 1
1
name : commander_ui
2
2
description : Commander is a Dart library for creating user interfaces within the terminal.
3
- version : 2.2.2
3
+ version : 2.2.3
4
4
repository : https://github.com/LeadcodeDev/commander
5
5
6
6
topics :
You can’t perform that action at this time.
0 commit comments