diff --git a/lib/main.dart b/lib/main.dart index 656788b..9577865 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -14,9 +14,20 @@ class MyApp extends StatelessWidget { return MaterialApp( debugShowCheckedModeBanner: false, title: 'Game Tracker', - themeMode: ThemeMode.dark, darkTheme: ThemeData.dark(), - theme: ThemeData(appBarTheme: CustomTheme.appBarTheme), + + themeMode: ThemeMode.dark, // forces light mode + theme: ThemeData( + primaryColor: CustomTheme.primaryColor, + scaffoldBackgroundColor: CustomTheme.backgroundColor, + appBarTheme: CustomTheme.appBarTheme, + + colorScheme: ColorScheme.fromSeed( + seedColor: CustomTheme.primaryColor, + brightness: Brightness.dark, + ).copyWith(surface: CustomTheme.backgroundColor), + ), + home: const CustomNavigationBar(), ); } diff --git a/lib/presentation/views/main_menu/custom_navigation_bar.dart b/lib/presentation/views/main_menu/custom_navigation_bar.dart index 0be94fe..3b2629a 100644 --- a/lib/presentation/views/main_menu/custom_navigation_bar.dart +++ b/lib/presentation/views/main_menu/custom_navigation_bar.dart @@ -3,6 +3,7 @@ import 'package:game_tracker/core/custom_theme.dart'; import 'package:game_tracker/presentation/views/main_menu/game_history_view.dart'; import 'package:game_tracker/presentation/views/main_menu/groups_view.dart'; import 'package:game_tracker/presentation/views/main_menu/home_view.dart'; +import 'package:game_tracker/presentation/views/main_menu/settings_view.dart'; import 'package:game_tracker/presentation/views/main_menu/statistics_view.dart'; class CustomNavigationBar extends StatefulWidget { @@ -22,12 +23,6 @@ class _CustomNavigationBarState extends State const StatisticsView(), ]; - void onTabTapped(int index) { - setState(() { - currentIndex = index; - }); - } - @override void initState() { super.initState(); @@ -39,7 +34,13 @@ class _CustomNavigationBarState extends State appBar: AppBar( backgroundColor: CustomTheme.backgroundColor, actions: [ - IconButton(onPressed: () {}, icon: const Icon(Icons.settings)), + IconButton( + onPressed: () => Navigator.push( + context, + MaterialPageRoute(builder: (_) => const SettingsView()), + ), + icon: const Icon(Icons.settings), + ), ], elevation: 0, ), @@ -98,4 +99,10 @@ class _CustomNavigationBarState extends State ), ); } + + void onTabTapped(int index) { + setState(() { + currentIndex = index; + }); + } } diff --git a/lib/presentation/views/main_menu/settings_view.dart b/lib/presentation/views/main_menu/settings_view.dart index 39bd978..c3e75f3 100644 --- a/lib/presentation/views/main_menu/settings_view.dart +++ b/lib/presentation/views/main_menu/settings_view.dart @@ -1,10 +1,13 @@ -import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; class SettingsView extends StatelessWidget { const SettingsView({super.key}); @override Widget build(BuildContext context) { - return const Center(child: Text('Settings View')); + return Scaffold( + appBar: AppBar(title: const Text('Einstellungen')), + body: const Center(child: Text('Settings View')), + ); } } diff --git a/pubspec.yaml b/pubspec.yaml index 992bd8f..abc2e18 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: game_tracker description: "Game Tracking App for Card Games" publish_to: 'none' -version: 0.0.1+18 +version: 0.0.1+21 environment: sdk: ^3.8.1