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.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..0ff0690f 100644 --- a/src/cli/CHANGELOG.md +++ b/src/cli/CHANGELOG.md @@ -5,6 +5,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) Prefix your items with `(Template)` if the change is about the template and not the resulting application. +## 0.21.0 +- Added design system, including color scheme and fonts. + ## 0.20.4 - Updates to documentation @@ -70,4 +73,4 @@ Prefix your items with `(Template)` if the change is about the template and not - Fixed minor bug where the current path was not being updated properly. - Added localization. - Added test for the killswitch. -- Added integration test for forced update. +- Added integration test for forced update. \ No newline at end of file