From e0b571a8085ce0ebbaa22d3b7aab1a84ac2a3f35 Mon Sep 17 00:00:00 2001 From: esche Date: Mon, 26 Jun 2023 17:42:09 +0200 Subject: [PATCH] added settings --- Frontend-user/lib/main.dart | 12 ++---------- Frontend-user/lib/settings.dart | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/Frontend-user/lib/main.dart b/Frontend-user/lib/main.dart index 584de41..9a450af 100644 --- a/Frontend-user/lib/main.dart +++ b/Frontend-user/lib/main.dart @@ -31,7 +31,7 @@ class MyApp extends StatelessWidget { brightness: Brightness.dark, seedColor: const Color(0xff5f7c61), )), - themeMode: ThemeMode.dark, + themeMode: ThemeMode.system, home: const MyHomePage(), ); } @@ -82,15 +82,7 @@ class _MyHomePageState extends State { body: [ const Shopping(), const Finance(), - ListView(children: const [ - ListTile( - leading: Icon(Icons.dark_mode), - title: Text( - 'Hier könnten Einstellungen zu Darkmode mit shared_preferences und riverpod sein', - maxLines: 2, - ), - ) - ]) + const Settings() ][currentPageIndex], ); } diff --git a/Frontend-user/lib/settings.dart b/Frontend-user/lib/settings.dart index e69de29..78ba67f 100644 --- a/Frontend-user/lib/settings.dart +++ b/Frontend-user/lib/settings.dart @@ -0,0 +1,19 @@ +import 'package:flutter/material.dart'; + +class Settings extends StatelessWidget { + const Settings({super.key}); + + @override + Widget build(BuildContext context) { + //Hier in dem Return kann der Inhalt des Setting Tabs angepasst werden + return ListView(children: const [ + ListTile( + leading: Icon(Icons.dark_mode), + title: Text( + 'Hier könnten Einstellungen zu Darkmode mit shared_preferences und riverpod sein', + maxLines: 2, + ), + ) + ]); + } +}