Skip to content

Commit fd9b840

Browse files
authored
Merge pull request #46 from nventive/dev/arle/design-system
feat: implement design system
2 parents d5bd350 + 02a611c commit fd9b840

10 files changed

Lines changed: 66 additions & 1 deletion

File tree

doc/Architecture.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,8 @@ This applications uses [Flutter](https://flutter.dev/) as the UI framework.
161161
### Design System
162162

163163
This application uses resources from Material Design.
164+
The application's theme data is defined in the `global_theme_data` file in the `styles` folder.
165+
Any other files related to the application's design system should be added to this folder.
164166

165167
### Localization
166168

109 KB
Binary file not shown.
110 KB
Binary file not shown.
53.8 KB
Binary file not shown.
110 KB
Binary file not shown.
109 KB
Binary file not shown.

src/app/lib/app.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import 'package:app/app_router.dart';
22
import 'package:app/l10n/gen_l10n/app_localizations.dart';
3+
import 'package:app/presentation/styles/global_theme_data.dart';
34
import 'package:flutter/material.dart';
45

56
final class App extends StatelessWidget {
@@ -8,6 +9,8 @@ final class App extends StatelessWidget {
89
@override
910
Widget build(BuildContext context) {
1011
return MaterialApp.router(
12+
theme: GlobalThemeData.lightThemeData,
13+
darkTheme: GlobalThemeData.darkThemeData,
1114
routerConfig: router,
1215
localizationsDelegates: AppLocalizations.localizationsDelegates,
1316
supportedLocales: AppLocalizations.supportedLocales,
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import 'package:flutter/material.dart';
2+
3+
class GlobalThemeData {
4+
static ThemeData lightThemeData = themeData(lightColorScheme);
5+
static ThemeData darkThemeData = themeData(darkColorScheme);
6+
7+
static ThemeData themeData(ColorScheme colorScheme) {
8+
return ThemeData(
9+
useMaterial3: true,
10+
fontFamily: 'Guillon',
11+
colorScheme: colorScheme,
12+
);
13+
}
14+
15+
static const ColorScheme lightColorScheme = ColorScheme(
16+
primary: Color(0xFF0D59CD),
17+
onPrimary: Colors.white,
18+
secondary: Color(0xFF5BC5F2),
19+
onSecondary: Color(0xFF001E60),
20+
error: Color(0xFFD93B27),
21+
onError: Color(0xFFFDEFED),
22+
surface: Color(0xFFF5FAFF),
23+
onSurface: Color(0xFF001E60),
24+
brightness: Brightness.light,
25+
);
26+
27+
static const ColorScheme darkColorScheme = ColorScheme(
28+
primary: Color(0xFF89C5FF),
29+
onPrimary: Color(0xFF121821),
30+
secondary: Color(0xFFFCA58B),
31+
onSecondary: Color(0xFF302B29),
32+
error: Color(0xFFE8897D),
33+
onError: Color(0xFF32110D),
34+
surface: Color(0xFF2C3034),
35+
onSurface: Colors.white,
36+
brightness: Brightness.dark,
37+
);
38+
}

src/app/pubspec.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,25 @@ flutter:
5959

6060
assets:
6161
- assets/openSourceSoftwareLicenses.json
62+
- assets/fonts/guillon_black.ttf
63+
- assets/fonts/guillon_bold.ttf
64+
- assets/fonts/guillon_light.ttf
65+
- assets/fonts/guillon_regular.ttf
66+
- assets/fonts/guillon_semibold.ttf
6267
- .env.dev
6368
- .env.staging
6469
- .env.prod
70+
71+
fonts:
72+
- family: Guillon
73+
fonts:
74+
- asset: assets/fonts/guillon_light.ttf
75+
weight: 300
76+
- asset: assets/fonts/guillon_regular.ttf
77+
weight: 400
78+
- asset: assets/fonts/guillon_semibold.ttf
79+
weight: 600
80+
- asset: assets/fonts/guillon_bold.ttf
81+
weight: 700
82+
- asset: assets/fonts/guillon_black.ttf
83+
weight: 900

src/cli/CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
55

66
Prefix your items with `(Template)` if the change is about the template and not the resulting application.
77

8+
## 0.25.0
9+
- Added design system, including color scheme and fonts.
10+
811
## 0.24.4
912
- Fix commit validation after a merge.
1013
- Update localization documentation.
@@ -100,4 +103,4 @@ Prefix your items with `(Template)` if the change is about the template and not
100103
- Fixed minor bug where the current path was not being updated properly.
101104
- Added localization.
102105
- Added test for the killswitch.
103-
- Added integration test for forced update.
106+
- Added integration test for forced update.

0 commit comments

Comments
 (0)