mirror of
https://github.com/venera-app/venera.git
synced 2025-09-27 07:47:24 +00:00
improve code
This commit is contained in:
@@ -3,15 +3,12 @@ part of 'settings_page.dart';
|
||||
class _SwitchSetting extends StatefulWidget {
|
||||
const _SwitchSetting({
|
||||
required this.title,
|
||||
this.subtitle,
|
||||
required this.settingKey,
|
||||
this.onChanged,
|
||||
});
|
||||
|
||||
final String title;
|
||||
|
||||
final String? subtitle;
|
||||
|
||||
final String settingKey;
|
||||
|
||||
final VoidCallback? onChanged;
|
||||
@@ -27,7 +24,6 @@ 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