Skip to content

Commit

Permalink
Minor logic bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Kamoool committed Jul 4, 2022
1 parent cf3f1a4 commit f729e76
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion lib/screens/port_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ class _PortScreenState extends State<PortScreen>
.map((item) => DropdownMenuItem<SerialPort>(
value: item,
child: Text(
item.description ?? 'Unknown',
item.productName ?? 'Unknown',
style: const TextStyle(
fontSize: 20,
color: Colors.black,
Expand Down
12 changes: 6 additions & 6 deletions lib/widgets/downshifter_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ class _DownshifterWidgetState extends State<DownshifterWidget> {
children: [
AnimatedToggleSwitch<bool>.dual(
current: SettingsRepository().dsEnable.value == '1',
first: false,
second: true,
first: true,
second: false,
dif: 80.0,
borderColor: Colors.transparent,
borderWidth: 1.0,
Expand All @@ -55,23 +55,23 @@ class _DownshifterWidgetState extends State<DownshifterWidget> {
colorBuilder: (b) => b ? Colors.red : Colors.green,
iconBuilder: (value) => value
? const Icon(
Icons.cancel_outlined,
Icons.task_alt_outlined,
color: Colors.white,
)
: const Icon(
Icons.task_alt_outlined,
Icons.cancel_outlined,
color: Colors.white,
),
textBuilder: (value) => value
? const Center(
child: Text(
'Disabled',
'Enabled',
style:
TextStyle(color: Colors.white, fontSize: 25),
))
: const Center(
child: Text(
'Enabled',
'Disabled',
style:
TextStyle(color: Colors.white, fontSize: 25),
)),
Expand Down
14 changes: 7 additions & 7 deletions lib/widgets/quickshifter_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ class _QuickshifterWidgetState extends State<QuickshifterWidget> {
children: [
AnimatedToggleSwitch<bool>.dual(
current: SettingsRepository().qsEnable.value == '1',
first: false,
second: true,
first: true,
second: false,
dif: 80.0,
borderColor: Colors.transparent,
borderWidth: 1.0,
Expand All @@ -52,26 +52,26 @@ class _QuickshifterWidgetState extends State<QuickshifterWidget> {
onChanged: (b) => setState(() => b
? SettingsRepository().qsEnable.value = '1'
: SettingsRepository().qsEnable.value = '0'),
colorBuilder: (b) => b ? Colors.red : Colors.green,
colorBuilder: (b) => b ? Colors.green : Colors.red,
iconBuilder: (value) => value
? const Icon(
Icons.cancel_outlined,
Icons.task_alt_outlined,
color: Colors.white,
)
: const Icon(
Icons.task_alt_outlined,
Icons.cancel_outlined,
color: Colors.white,
),
textBuilder: (value) => value
? const Center(
child: Text(
'Disabled',
'Enabled',
style:
TextStyle(color: Colors.white, fontSize: 25),
))
: const Center(
child: Text(
'Enabled',
'Disabled',
style:
TextStyle(color: Colors.white, fontSize: 25),
)),
Expand Down

0 comments on commit f729e76

Please sign in to comment.