make toggleValue nullable
This commit is contained in:
parent
7cee5e1b70
commit
25195e369c
1 changed files with 2 additions and 2 deletions
|
@ -26,7 +26,7 @@ class ToggleSwitchWidget extends StatefulWidget {
|
|||
}
|
||||
|
||||
class _ToggleSwitchWidgetState extends State<ToggleSwitchWidget> {
|
||||
late bool toggleValue;
|
||||
bool? toggleValue;
|
||||
ExecutionState executionState = ExecutionState.idle;
|
||||
final _debouncer = Debouncer(const Duration(milliseconds: 300));
|
||||
|
||||
|
@ -96,7 +96,7 @@ class _ToggleSwitchWidgetState extends State<ToggleSwitchWidget> {
|
|||
});
|
||||
}
|
||||
} else {
|
||||
toggleValue = !toggleValue;
|
||||
toggleValue = !toggleValue!;
|
||||
executionState = ExecutionState.idle;
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue