From ebc5776e78b80aa2dac2932e452b200863d6b080 Mon Sep 17 00:00:00 2001 From: Crondung <1922635@stud.hs-mannheim.de> Date: Mon, 6 Mar 2023 18:51:00 +0100 Subject: [PATCH] add asset background --- lib/globals.dart | 2 +- lib/pages/main_page.dart | 9 ++++++++- pubspec.yaml | 1 + 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/globals.dart b/lib/globals.dart index 3cdf823..1381241 100644 --- a/lib/globals.dart +++ b/lib/globals.dart @@ -7,4 +7,4 @@ DatabaseService databaseService = DatabaseMock(); // DatabaseService databaseService = DatabaseService.instance; // set this to read settings from local json file instead of scanning a qr code -bool useLocalConfig = false; +bool useLocalConfig = true; diff --git a/lib/pages/main_page.dart b/lib/pages/main_page.dart index 9d6c77b..2fd100f 100644 --- a/lib/pages/main_page.dart +++ b/lib/pages/main_page.dart @@ -37,7 +37,14 @@ class MyHomePage extends StatelessWidget { '${pageProvider.currentPageData['title']} ${isConfigured ? "Gruppe ${settingsProvider.settings?.group}" : ""}') ], )), - body: pageProvider.currentPageData['page'], + body: Stack(alignment: Alignment.center, children: [ + Image.asset( + 'assets/ZI_logo.png', + opacity: const AlwaysStoppedAnimation(0.05), + width: MediaQuery.of(context).size.width * 0.8, + ), + pageProvider.currentPageData['page'], + ]), bottomNavigationBar: NavigationBar( onDestinationSelected: isConfigured ? pageProvider.setCurrentPage diff --git a/pubspec.yaml b/pubspec.yaml index ac1fafe..79d6adc 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -48,3 +48,4 @@ flutter: - assets/finish.mp3 - assets/group1.json - assets/group3.json + - assets/ZI_logo.png