Skip to content

Commit f729e76

Browse files
committed
Minor logic bug fixes
1 parent cf3f1a4 commit f729e76

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

lib/screens/port_screen.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ class _PortScreenState extends State<PortScreen>
129129
.map((item) => DropdownMenuItem<SerialPort>(
130130
value: item,
131131
child: Text(
132-
item.description ?? 'Unknown',
132+
item.productName ?? 'Unknown',
133133
style: const TextStyle(
134134
fontSize: 20,
135135
color: Colors.black,

lib/widgets/downshifter_widget.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ class _DownshifterWidgetState extends State<DownshifterWidget> {
3434
children: [
3535
AnimatedToggleSwitch<bool>.dual(
3636
current: SettingsRepository().dsEnable.value == '1',
37-
first: false,
38-
second: true,
37+
first: true,
38+
second: false,
3939
dif: 80.0,
4040
borderColor: Colors.transparent,
4141
borderWidth: 1.0,
@@ -55,23 +55,23 @@ class _DownshifterWidgetState extends State<DownshifterWidget> {
5555
colorBuilder: (b) => b ? Colors.red : Colors.green,
5656
iconBuilder: (value) => value
5757
? const Icon(
58-
Icons.cancel_outlined,
58+
Icons.task_alt_outlined,
5959
color: Colors.white,
6060
)
6161
: const Icon(
62-
Icons.task_alt_outlined,
62+
Icons.cancel_outlined,
6363
color: Colors.white,
6464
),
6565
textBuilder: (value) => value
6666
? const Center(
6767
child: Text(
68-
'Disabled',
68+
'Enabled',
6969
style:
7070
TextStyle(color: Colors.white, fontSize: 25),
7171
))
7272
: const Center(
7373
child: Text(
74-
'Enabled',
74+
'Disabled',
7575
style:
7676
TextStyle(color: Colors.white, fontSize: 25),
7777
)),

lib/widgets/quickshifter_widget.dart

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ class _QuickshifterWidgetState extends State<QuickshifterWidget> {
3434
children: [
3535
AnimatedToggleSwitch<bool>.dual(
3636
current: SettingsRepository().qsEnable.value == '1',
37-
first: false,
38-
second: true,
37+
first: true,
38+
second: false,
3939
dif: 80.0,
4040
borderColor: Colors.transparent,
4141
borderWidth: 1.0,
@@ -52,26 +52,26 @@ class _QuickshifterWidgetState extends State<QuickshifterWidget> {
5252
onChanged: (b) => setState(() => b
5353
? SettingsRepository().qsEnable.value = '1'
5454
: SettingsRepository().qsEnable.value = '0'),
55-
colorBuilder: (b) => b ? Colors.red : Colors.green,
55+
colorBuilder: (b) => b ? Colors.green : Colors.red,
5656
iconBuilder: (value) => value
5757
? const Icon(
58-
Icons.cancel_outlined,
58+
Icons.task_alt_outlined,
5959
color: Colors.white,
6060
)
6161
: const Icon(
62-
Icons.task_alt_outlined,
62+
Icons.cancel_outlined,
6363
color: Colors.white,
6464
),
6565
textBuilder: (value) => value
6666
? const Center(
6767
child: Text(
68-
'Disabled',
68+
'Enabled',
6969
style:
7070
TextStyle(color: Colors.white, fontSize: 25),
7171
))
7272
: const Center(
7373
child: Text(
74-
'Enabled',
74+
'Disabled',
7575
style:
7676
TextStyle(color: Colors.white, fontSize: 25),
7777
)),

0 commit comments

Comments
 (0)