Some comments never hurt anyone

This commit is contained in:
2023-12-30 23:05:06 +02:00
parent 23218c22d7
commit 7a0bd79e37
7 changed files with 53 additions and 12 deletions

View File

@@ -9,7 +9,7 @@ class Settings extends StatefulWidget {
}
class _Settings extends State<Settings> {
late String selectedTheme = 'Dark';
late String selectedTheme = 'Dark'; // Default app theme
@override
Widget build(BuildContext context) {
@@ -20,9 +20,12 @@ class _Settings extends State<Settings> {
body: ListView(
children:[
// List of Tiles in the Settings Screen
// Starting with App Theme
ListTile(
title: const Text("App Theme"),
subtitle: const Text("Sets the theme of the app between: Dark, Light, System Default."),
// User Selection
trailing: DropdownButton<String> (
value: selectedTheme,
items: <String>["Light", "Dark", "System Default"].map((String value) {
@@ -31,6 +34,7 @@ class _Settings extends State<Settings> {
child: Text(value),
);
}).toList(),
// Updating Selection
onChanged: (String? updatedTheme) {
setState(() {
selectedTheme = updatedTheme ?? selectedTheme;