We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 30e531d commit 9a321beCopy full SHA for 9a321be
lib/Adaptor/Settings/SettingsItem.dart
@@ -75,6 +75,14 @@ class SettingSwitchItemState extends State<SettingSwitchItem> {
75
_isChecked = widget.setting.isChecked;
76
}
77
78
+ @override
79
+ void didUpdateWidget(covariant SettingSwitchItem oldWidget) {
80
+ if (oldWidget.setting.isChecked != widget.setting.isChecked) {
81
+ setState(() => _isChecked = widget.setting.isChecked);
82
+ }
83
+ super.didUpdateWidget(oldWidget);
84
85
+
86
@override
87
Widget build(BuildContext context) {
88
if (!widget.setting.isVisible) return const SizedBox.shrink();
0 commit comments