diff --git a/assets/flags/de.png b/assets/flags/de.png new file mode 100644 index 0000000..d9b538e Binary files /dev/null and b/assets/flags/de.png differ diff --git a/assets/flags/en.png b/assets/flags/en.png new file mode 100644 index 0000000..c825962 Binary files /dev/null and b/assets/flags/en.png differ diff --git a/assets/flags/fr.png b/assets/flags/fr.png new file mode 100644 index 0000000..25cf726 Binary files /dev/null and b/assets/flags/fr.png differ diff --git a/lib/main.dart b/lib/main.dart index 555a03e..e0e0002 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -20,24 +20,22 @@ class MyApp extends StatelessWidget { ) ], child: MaterialApp( - theme: ThemeData( - colorScheme: const ColorScheme( - primary: Color.fromRGBO(236, 92, 61, 1), - onPrimary: Color.fromRGBO(240, 240, 240, 1), - secondary: Color.fromRGBO(203, 203, 203, 1), - onSecondary: Color.fromRGBO(60, 60, 60, 1), - error: Colors.red, - onError: Colors.white, - surface: Colors.white, - onSurface: Color.fromRGBO(60, 60, 60, 1), - brightness: Brightness.light, - tertiary: Color.fromRGBO(251, 216, 17, 0), - onTertiary: Color.fromRGBO(60, 60, 60, 1) + theme: ThemeData( + colorScheme: const ColorScheme( + primary: Color.fromRGBO(236, 92, 61, 1), + onPrimary: Color.fromRGBO(240, 240, 240, 1), + secondary: Color.fromRGBO(203, 203, 203, 1), + onSecondary: Color.fromRGBO(60, 60, 60, 1), + error: Colors.red, + onError: Colors.white, + surface: Colors.white, + onSurface: Color.fromRGBO(60, 60, 60, 1), + brightness: Brightness.light, + tertiary: Color.fromRGBO(251, 216, 17, 0), + onTertiary: Color.fromRGBO(60, 60, 60, 1)), + useMaterial3: true, ), - useMaterial3: true, - ), - home: const MyHome() - ), + home: const MyHome()), ); } } @@ -48,44 +46,102 @@ class MyHome extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold( - appBar: AppBar(), - body: Consumer( - builder: (context, pageProvider, child) { - return pageProvider.pages[pageProvider.selectedPage]; - }, - ), - bottomNavigationBar: Padding( - padding: EdgeInsets.all(5), - child: GNav( - onTabChange: (index) { - Provider.of(context, listen: false).changePage(index); + appBar: AppBar( + leading: IconButton( + icon: Icon( + Icons.home, + size: 36, + color: Theme.of(context).colorScheme.onPrimary, + ), + onPressed: () { + // Aktion für diesen Button }, - gap: 8, - style: GnavStyle.google, - backgroundColor: Theme.of(context).colorScheme.surface, - color: Theme.of(context).colorScheme.onSurface, - activeColor: Theme.of(context).colorScheme.onPrimary, - tabBackgroundColor: Theme.of(context).colorScheme.primary, - tabs: const [ - GButton( - icon: Icons.fastfood_outlined, - text: "Essen", - ),GButton( - icon: Icons.landscape, - text: "Ambiente", - ),GButton( - icon: Icons.mood, - text: "Service", - ),GButton( - icon: Icons.feedback, - text: "Verschläge", - ), GButton( - icon: Icons.comment, - text: "Verbesserungen", - ), - ], ), - ) + title: Container( + height: 40, + decoration: BoxDecoration( + color: Theme.of(context) + .colorScheme + .primaryContainer, // Hintergrundfarbe des Textfelds + borderRadius: BorderRadius.circular(15), + ), + alignment: Alignment.centerLeft, + child: Text( + "Placeholder", + style: TextStyle( + color: Theme.of(context).colorScheme.onPrimary, + fontWeight: FontWeight.bold, + ), + ), + ), + backgroundColor: Theme.of(context).colorScheme.primary, + actions: [ + IconButton( + icon: Image.asset( + 'assets/flags/de.png', + width: 34, + height: 24, + fit: BoxFit.cover, + ), // Erster Button rechts + onPressed: () { + // Aktion für diesen Button + }, + ), + IconButton( + icon: Image.asset( + 'assets/flags/fr.png', + width: 34, + height: 24, + fit: BoxFit.cover, + ), // Zweiter Button rechts + onPressed: () { + // Aktion für diesen Button + }, + ), + IconButton( + icon: Image.asset( + 'assets/flags/en.png', + width: 34, + height: 24, + fit: BoxFit.cover, + ), // Dritter Button rechts + onPressed: () { + // Aktion für diesen Button + }, + ), + ], + ), + body: Container(), + bottomNavigationBar: GNav( + onTabChange: (index) {}, + gap: 8, + backgroundColor: Theme.of(context).colorScheme.secondary, + color: Theme.of(context).colorScheme.onSurface, + activeColor: Theme.of(context).colorScheme.onPrimary, + tabBackgroundColor: Theme.of(context).colorScheme.primary, + tabs: const [ + GButton( + icon: Icons.food_bank, + text: "Essen", + ), + GButton( + icon: Icons.room, + text: "Ambiente", + ), + GButton( + icon: Icons.person, + text: "Service", + ), + GButton( + icon: Icons.question_mark, + text: "Verschläge", + ), + GButton( + icon: Icons.add_rounded, + text: "Verbesserungen", + ), + ], + ), ); } } diff --git a/pubspec.yaml b/pubspec.yaml index d883c88..6a1fb9a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -54,7 +54,8 @@ dev_dependencies: # The following section is specific to Flutter packages. flutter: - + assets: + - assets/flags/ # The following line ensures that the Material Icons font is # included with your application, so that you can use the icons in # the material Icons class.