mirror of
https://github.com/venera-app/venera.git
synced 2025-09-27 07:47:24 +00:00
improve reader; fix #21
This commit is contained in:
@@ -5,6 +5,7 @@ class _SwitchSetting extends StatefulWidget {
|
||||
required this.title,
|
||||
required this.settingKey,
|
||||
this.onChanged,
|
||||
this.subtitle,
|
||||
});
|
||||
|
||||
final String title;
|
||||
@@ -13,6 +14,8 @@ class _SwitchSetting extends StatefulWidget {
|
||||
|
||||
final VoidCallback? onChanged;
|
||||
|
||||
final String? subtitle;
|
||||
|
||||
@override
|
||||
State<_SwitchSetting> createState() => _SwitchSettingState();
|
||||
}
|
||||
@@ -24,6 +27,7 @@ class _SwitchSettingState extends State<_SwitchSetting> {
|
||||
|
||||
return ListTile(
|
||||
title: Text(widget.title),
|
||||
subtitle: widget.subtitle == null ? null : Text(widget.subtitle!),
|
||||
trailing: Switch(
|
||||
value: appdata.settings[widget.settingKey],
|
||||
onChanged: (value) {
|
||||
|
Reference in New Issue
Block a user