Skip to content

Commit

Permalink
Feat/UI home page (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
MayuriXx authored Feb 24, 2022
1 parent 70a00e7 commit 1f041c9
Show file tree
Hide file tree
Showing 14 changed files with 317 additions and 932 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
java-version: '12.x'
- uses: subosito/flutter-action@v2
with:
flutter-version: '2.10.0'
flutter-version: '2.10.2'
- name: create firebase options
run: |
echo $FIREBASE_OPTIONS | base64 -d > lib/firebase_options.dart
Expand Down Expand Up @@ -39,7 +39,7 @@ jobs:
java-version: '12.x'
- uses: subosito/flutter-action@v2
with:
flutter-version: '2.10.0'
flutter-version: '2.10.2'
- name: create firebase options
run: |
echo "${{ env.FIREBASE_OPTIONS }}" | base64 -d > lib\firebase_options.dart
Expand Down Expand Up @@ -71,7 +71,7 @@ jobs:
java-version: '12.x'
- uses: subosito/flutter-action@v2
with:
flutter-version: '2.10.0'
flutter-version: '2.10.2'
- name: create firebase options
run: |
echo $FIREBASE_OPTIONS | base64 -d > lib/firebase_options.dart
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/firebase-hosting-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- uses: actions/checkout@v2
- uses: subosito/flutter-action@v2
with:
flutter-version: '2.8.1'
flutter-version: '2.10.2'
- name: create firebase options
run: |
echo $FIREBASE_OPTIONS | base64 -d > lib/firebase_options.dart
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/firebase-hosting-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- uses: actions/checkout@v2
- uses: subosito/flutter-action@v2
with:
flutter-version: '2.8.1'
flutter-version: '2.10.2'
- name: create firebase options
run: |
echo $FIREBASE_OPTIONS | base64 -d > lib/firebase_options.dart
Expand Down
Binary file added assets/images/mascotte_without_background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 25 additions & 12 deletions lib/app/app.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import 'package:adaptive_theme/adaptive_theme.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:puzzle/bloc/bloc.dart';
import 'package:puzzle/services/shared.dart';
import 'package:puzzle/theme/theme.dart';
Expand All @@ -23,17 +23,30 @@ class PuzzleApp extends StatelessWidget {
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
}

return MaterialApp.router(
routeInformationParser: _router.routeInformationParser,
routerDelegate: _router.routerDelegate,
onGenerateTitle: (context) => AppLocalizations.of(context)!.app_name,
localizationsDelegates: AppLocalizations.localizationsDelegates,
supportedLocales: AppLocalizations.supportedLocales,
theme: ThemeData(
primarySwatch: xpehoGreen,
textTheme: GoogleFonts.aBeeZeeTextTheme(),
backgroundColor: Colors.white),
themeMode: ThemeMode.light,
return AdaptiveTheme(
light: ThemeData(
brightness: Brightness.light,
primarySwatch: xpehoGreen,
backgroundColor: Colors.white,
primaryColor: xpehoGreen,
),
dark: ThemeData(
brightness: Brightness.dark,
primarySwatch: xpehoGreen,
backgroundColor: Colors.grey[900],
primaryColor: xpehoGreen,
),
initial: AdaptiveThemeMode.light,
builder: (theme, darkTheme) => MaterialApp.router(
routeInformationParser: _router.routeInformationParser,
routerDelegate: _router.routerDelegate,
onGenerateTitle: (context) =>
AppLocalizations.of(context)!.app_name,
localizationsDelegates: AppLocalizations.localizationsDelegates,
supportedLocales: AppLocalizations.supportedLocales,
theme: theme,
darkTheme: darkTheme,
),
);
},
);
Expand Down
4 changes: 4 additions & 0 deletions lib/l10n/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -76,5 +76,9 @@
"leader_board_subtitle": "Scoreboard : ",
"@leader_board_subtitle": {
"description": "Scoreboard : "
},
"bottom_badges_title": "CrossPlatform : ",
"@bottom_badges_title": {
"description": "CrossPlatform : "
}
}
3 changes: 2 additions & 1 deletion lib/l10n/app_fr.arb
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@
"nickname_hint": "Entrez votre pseudo...",
"your_score": "Votre score: {value}",
"empty_nickname_error": "Le pseudonyme ne peut être vide",
"leader_board_subtitle": "Tableau des scores : "
"leader_board_subtitle": "Tableau des scores : ",
"bottom_badges_title": "Multiplateforme : "
}
1 change: 1 addition & 0 deletions lib/theme/theme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ Map<int, Color> color = {
};

MaterialColor xpehoGreen = MaterialColor(0xFFB3D26B, color);
Color xpehoGreenDark = const Color.fromARGB(255, 11, 66, 40);
Loading

0 comments on commit 1f041c9

Please sign in to comment.