diff --git a/lib/assets.dart b/lib/assets.dart new file mode 100644 index 00000000..bfec560e --- /dev/null +++ b/lib/assets.dart @@ -0,0 +1,36 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +// ************************************************************************** +// Total assets: 9. +// Generated by https://pub.dev/packages/assets_gen. +// ************************************************************************** +class Assets { + static const String package = 'dhbwstudentapp'; + + static const String assets_app_icon_png = 'assets/app_icon.png'; + static const String dhbwstudentapp$assets_app_icon_png = 'packages/dhbwstudentapp/assets/app_icon.png'; + + static const String assets_empty_state_png = 'assets/empty_state.png'; + static const String dhbwstudentapp$assets_empty_state_png = 'packages/dhbwstudentapp/assets/empty_state.png'; + + static const String assets_onboarding_bottom_background_png = 'assets/onboarding_bottom_background.png'; + static const String dhbwstudentapp$assets_onboarding_bottom_background_png = 'packages/dhbwstudentapp/assets/onboarding_bottom_background.png'; + + static const String assets_onboarding_bottom_background_dark_png = 'assets/onboarding_bottom_background_dark.png'; + static const String dhbwstudentapp$assets_onboarding_bottom_background_dark_png = 'packages/dhbwstudentapp/assets/onboarding_bottom_background_dark.png'; + + static const String assets_onboarding_bottom_foreground_png = 'assets/onboarding_bottom_foreground.png'; + static const String dhbwstudentapp$assets_onboarding_bottom_foreground_png = 'packages/dhbwstudentapp/assets/onboarding_bottom_foreground.png'; + + static const String assets_onboarding_bottom_foreground_dark_png = 'assets/onboarding_bottom_foreground_dark.png'; + static const String dhbwstudentapp$assets_onboarding_bottom_foreground_dark_png = 'packages/dhbwstudentapp/assets/onboarding_bottom_foreground_dark.png'; + + static const String assets_schedule_empty_state_png = 'assets/schedule_empty_state.png'; + static const String dhbwstudentapp$assets_schedule_empty_state_png = 'packages/dhbwstudentapp/assets/schedule_empty_state.png'; + + static const String assets_schedule_empty_state_dark_png = 'assets/schedule_empty_state_dark.png'; + static const String dhbwstudentapp$assets_schedule_empty_state_dark_png = 'packages/dhbwstudentapp/assets/schedule_empty_state_dark.png'; + + static const String assets_splash_png = 'assets/splash.png'; + static const String dhbwstudentapp$assets_splash_png = 'packages/dhbwstudentapp/assets/splash.png'; +} diff --git a/lib/schedule/ui/dailyschedule/daily_schedule_page.dart b/lib/schedule/ui/dailyschedule/daily_schedule_page.dart index baccc30f..e12a9673 100644 --- a/lib/schedule/ui/dailyschedule/daily_schedule_page.dart +++ b/lib/schedule/ui/dailyschedule/daily_schedule_page.dart @@ -1,3 +1,4 @@ +import 'package:dhbwstudentapp/assets.dart'; import 'package:dhbwstudentapp/common/i18n/localizations.dart'; import 'package:dhbwstudentapp/common/ui/text_styles.dart'; import 'package:dhbwstudentapp/schedule/ui/dailyschedule/widgets/current_time_indicator_widget.dart'; @@ -73,7 +74,7 @@ class _DailySchedulePageState extends State { padding: const EdgeInsets.fromLTRB(32, 64, 32, 32), child: Opacity( opacity: 0.9, - child: Image.asset("assets/empty_state.png"), + child: Image.asset(Assets.assets_empty_state_png), ), ) ], diff --git a/lib/schedule/ui/widgets/schedule_empty_state.dart b/lib/schedule/ui/widgets/schedule_empty_state.dart index 37c846cc..436d26f1 100644 --- a/lib/schedule/ui/widgets/schedule_empty_state.dart +++ b/lib/schedule/ui/widgets/schedule_empty_state.dart @@ -1,3 +1,4 @@ +import 'package:dhbwstudentapp/assets.dart'; import 'package:dhbwstudentapp/common/i18n/localizations.dart'; import 'package:dhbwstudentapp/schedule/ui/widgets/select_source_dialog.dart'; import 'package:dhbwstudentapp/ui/banner_widget.dart'; @@ -6,8 +7,8 @@ import 'package:kiwi/kiwi.dart'; class ScheduleEmptyState extends StatelessWidget { final Map image = { - Brightness.dark: "assets/schedule_empty_state_dark.png", - Brightness.light: "assets/schedule_empty_state.png", + Brightness.dark: Assets.assets_schedule_empty_state_dark_png, + Brightness.light: Assets.assets_schedule_empty_state_png, }; @override diff --git a/lib/ui/onboarding/widgets/onboarding_page_background.dart b/lib/ui/onboarding/widgets/onboarding_page_background.dart index f0f91a24..0e676561 100644 --- a/lib/ui/onboarding/widgets/onboarding_page_background.dart +++ b/lib/ui/onboarding/widgets/onboarding_page_background.dart @@ -1,3 +1,4 @@ +import 'package:dhbwstudentapp/assets.dart'; import 'package:dhbwstudentapp/common/math/math.dart'; import 'package:dhbwstudentapp/common/ui/colors.dart'; import 'package:dhbwstudentapp/common/util/platform_util.dart'; @@ -11,13 +12,13 @@ class OnboardingPageBackground extends StatelessWidget { final Animation bottomBackground; final Map foreground = { - Brightness.light: "assets/onboarding_bottom_foreground.png", - Brightness.dark: "assets/onboarding_bottom_foreground_dark.png", + Brightness.light: Assets.assets_onboarding_bottom_foreground_png, + Brightness.dark: Assets.assets_onboarding_bottom_foreground_dark_png, }; final Map background = { - Brightness.light: "assets/onboarding_bottom_background.png", - Brightness.dark: "assets/onboarding_bottom_background_dark.png", + Brightness.light: Assets.assets_onboarding_bottom_background_png, + Brightness.dark: Assets.assets_onboarding_bottom_background_dark_png, }; OnboardingPageBackground({Key? key, required this.controller}) diff --git a/lib/ui/settings/settings_page.dart b/lib/ui/settings/settings_page.dart index 0f1f69bf..3e6371e7 100644 --- a/lib/ui/settings/settings_page.dart +++ b/lib/ui/settings/settings_page.dart @@ -1,3 +1,4 @@ +import 'package:dhbwstudentapp/assets.dart'; import 'package:dhbwstudentapp/common/application_constants.dart'; import 'package:dhbwstudentapp/common/background/task_callback.dart'; import 'package:dhbwstudentapp/common/background/work_scheduler_service.dart'; @@ -95,7 +96,7 @@ class _SettingsPageState extends State { showAboutDialog( context: context, applicationIcon: Image.asset( - "assets/app_icon.png", + Assets.assets_app_icon_png, width: 75, ), applicationLegalese: L.of(context).applicationLegalese, diff --git a/pubspec.lock b/pubspec.lock index 544208eb..40dc89d2 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -22,6 +22,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.0.2" + ansicolor: + dependency: transitive + description: + name: ansicolor + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.1" app_group_directory: dependency: "direct main" description: @@ -43,6 +50,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.3.0" + assets_gen: + dependency: "direct dev" + description: + name: assets_gen + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.0" async: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 8d2b8f3f..a8a1cda1 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -54,6 +54,7 @@ dependencies: workmanager: ^0.5.0 dev_dependencies: + assets_gen: ^1.2.0 build_runner: ^2.3.0 copy_with_extension_gen: ^4.0.0 flutter_test: