diff --git a/doc/Architecture.md b/doc/Architecture.md index 6b351a73..fba16e08 100644 --- a/doc/Architecture.md +++ b/doc/Architecture.md @@ -123,6 +123,8 @@ This applications uses [Flutter](https://flutter.dev/) as the UI framework. ### Design System This application uses resources from Material Design. +The application's Theme Data is defined in the `global_theme_data` file in the `styles` folder. +Any other files related to the application's design system should be added to this folder. ### Localization diff --git a/src/app/assets/fonts/guillon_black.ttf b/src/app/assets/fonts/guillon_black.ttf new file mode 100644 index 00000000..1174153f Binary files /dev/null and b/src/app/assets/fonts/guillon_black.ttf differ diff --git a/src/app/assets/fonts/guillon_bold.ttf b/src/app/assets/fonts/guillon_bold.ttf new file mode 100644 index 00000000..1de8d78d Binary files /dev/null and b/src/app/assets/fonts/guillon_bold.ttf differ diff --git a/src/app/assets/fonts/guillon_light.ttf b/src/app/assets/fonts/guillon_light.ttf new file mode 100644 index 00000000..f2a1bef8 Binary files /dev/null and b/src/app/assets/fonts/guillon_light.ttf differ diff --git a/src/app/assets/fonts/guillon_regular.ttf b/src/app/assets/fonts/guillon_regular.ttf new file mode 100644 index 00000000..a7bd6b65 Binary files /dev/null and b/src/app/assets/fonts/guillon_regular.ttf differ diff --git a/src/app/assets/fonts/guillon_semibold.ttf b/src/app/assets/fonts/guillon_semibold.ttf new file mode 100644 index 00000000..9076c539 Binary files /dev/null and b/src/app/assets/fonts/guillon_semibold.ttf differ diff --git a/src/app/lib/app.dart b/src/app/lib/app.dart index f4710583..2c6c2aef 100644 --- a/src/app/lib/app.dart +++ b/src/app/lib/app.dart @@ -1,5 +1,6 @@ import 'package:app/app_router.dart'; import 'package:app/l10n/gen_l10n/app_localizations.dart'; +import 'package:app/presentation/styles/global_theme_data.dart'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; @@ -10,6 +11,8 @@ final class App extends StatelessWidget { Widget build(BuildContext context) { return ProviderScope( child: MaterialApp.router( + theme: GlobalThemeData.lightThemeData, + darkTheme: GlobalThemeData.darkThemeData, routerConfig: router, localizationsDelegates: AppLocalizations.localizationsDelegates, supportedLocales: AppLocalizations.supportedLocales, diff --git a/src/app/lib/presentation/styles/global_theme_data.dart b/src/app/lib/presentation/styles/global_theme_data.dart new file mode 100644 index 00000000..b001afd0 --- /dev/null +++ b/src/app/lib/presentation/styles/global_theme_data.dart @@ -0,0 +1,38 @@ +import 'package:flutter/material.dart'; + +class GlobalThemeData { + static ThemeData lightThemeData = themeData(lightColorScheme); + static ThemeData darkThemeData = themeData(darkColorScheme); + + static ThemeData themeData(ColorScheme colorScheme) { + return ThemeData( + useMaterial3: true, + fontFamily: 'Guillon', + colorScheme: colorScheme, + ); + } + + static const ColorScheme lightColorScheme = ColorScheme( + primary: Color(0xFF0D59CD), + onPrimary: Colors.white, + secondary: Color(0xFF5BC5F2), + onSecondary: Color(0xFF001E60), + error: Color(0xFFD93B27), + onError: Color(0xFFFDEFED), + surface: Color(0xFFF5FAFF), + onSurface: Color(0xFF001E60), + brightness: Brightness.light, + ); + + static const ColorScheme darkColorScheme = ColorScheme( + primary: Color(0xFF89C5FF), + onPrimary: Color(0xFF121821), + secondary: Color(0xFFFCA58B), + onSecondary: Color(0xFF302B29), + error: Color(0xFFE8897D), + onError: Color(0xFF32110D), + surface: Color(0xFF2C3034), + onSurface: Colors.white, + brightness: Brightness.dark, + ); +} diff --git a/src/app/pubspec.lock b/src/app/pubspec.lock index 74e2607c..c7afdf45 100644 --- a/src/app/pubspec.lock +++ b/src/app/pubspec.lock @@ -536,18 +536,18 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" + sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" url: "https://pub.dev" source: hosted - version: "10.0.4" + version: "10.0.5" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" + sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" url: "https://pub.dev" source: hosted - version: "3.0.3" + version: "3.0.5" leak_tracker_testing: dependency: transitive description: @@ -592,18 +592,18 @@ packages: dependency: transitive description: name: material_color_utilities - sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec url: "https://pub.dev" source: hosted - version: "0.8.0" + version: "0.11.1" meta: dependency: transitive description: name: meta - sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 url: "https://pub.dev" source: hosted - version: "1.12.0" + version: "1.15.0" mime: dependency: transitive description: @@ -776,10 +776,10 @@ packages: dependency: transitive description: name: platform - sha256: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec" + sha256: "9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65" url: "https://pub.dev" source: hosted - version: "3.1.4" + version: "3.1.5" plugin_platform_interface: dependency: transitive description: @@ -1077,10 +1077,10 @@ packages: dependency: transitive description: name: test_api - sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" + sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" url: "https://pub.dev" source: hosted - version: "0.7.0" + version: "0.7.2" timezone: dependency: transitive description: @@ -1197,10 +1197,10 @@ packages: dependency: transitive description: name: vm_service - sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" + sha256: f652077d0bdf60abe4c1f6377448e8655008eef28f128bc023f7b5e8dfeb48fc url: "https://pub.dev" source: hosted - version: "14.2.1" + version: "14.2.4" watcher: dependency: transitive description: diff --git a/src/app/pubspec.yaml b/src/app/pubspec.yaml index 85f99b15..581a53e4 100644 --- a/src/app/pubspec.yaml +++ b/src/app/pubspec.yaml @@ -54,6 +54,25 @@ flutter: assets: - assets/openSourceSoftwareLicenses.json + - assets/fonts/guillon_black.ttf + - assets/fonts/guillon_bold.ttf + - assets/fonts/guillon_light.ttf + - assets/fonts/guillon_regular.ttf + - assets/fonts/guillon_semibold.ttf - .env.dev - .env.staging - .env.prod + + fonts: + - family: Guillon + fonts: + - asset: assets/fonts/guillon_light.ttf + weight: 300 + - asset: assets/fonts/guillon_regular.ttf + weight: 400 + - asset: assets/fonts/guillon_semibold.ttf + weight: 600 + - asset: assets/fonts/guillon_bold.ttf + weight: 700 + - asset: assets/fonts/guillon_black.ttf + weight: 900 diff --git a/src/cli/CHANGELOG.md b/src/cli/CHANGELOG.md index 07c8c62f..dff21d69 100644 --- a/src/cli/CHANGELOG.md +++ b/src/cli/CHANGELOG.md @@ -71,3 +71,4 @@ Prefix your items with `(Template)` if the change is about the template and not - Added localization. - Added test for the killswitch. - Added integration test for forced update. +- Added design system, including color scheme and fonts.