Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: implement design system #46

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions doc/Architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Binary file added src/app/assets/fonts/guillon_black.ttf
Binary file not shown.
Binary file added src/app/assets/fonts/guillon_bold.ttf
Binary file not shown.
Binary file added src/app/assets/fonts/guillon_light.ttf
Binary file not shown.
Binary file added src/app/assets/fonts/guillon_regular.ttf
Binary file not shown.
Binary file added src/app/assets/fonts/guillon_semibold.ttf
Binary file not shown.
3 changes: 3 additions & 0 deletions src/app/lib/app.dart
Original file line number Diff line number Diff line change
@@ -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';

Expand All @@ -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,
Expand Down
38 changes: 38 additions & 0 deletions src/app/lib/presentation/styles/global_theme_data.dart
Original file line number Diff line number Diff line change
@@ -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,
);
}
19 changes: 19 additions & 0 deletions src/app/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions src/cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Loading