diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png index db77bb4..dce8bec 100644 Binary files a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png index 17987b7..99fd343 100644 Binary files a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png index 09d4391..e218664 100644 Binary files a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png index d5f1c8d..ed2e637 100644 Binary files a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png index 4d6372e..d5634d2 100644 Binary files a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/assets/images/background_analysis.png b/assets/images/background_analysis.png new file mode 100644 index 0000000..0c5d1ba Binary files /dev/null and b/assets/images/background_analysis.png differ diff --git a/assets/images/icon.png b/assets/images/icon.png new file mode 100644 index 0000000..17dcd26 Binary files /dev/null and b/assets/images/icon.png differ diff --git a/assets/images/image_achievement_card.png b/assets/images/image_achievement_card.png new file mode 100644 index 0000000..9078af5 Binary files /dev/null and b/assets/images/image_achievement_card.png differ diff --git a/assets/images/image_achievement_table.png b/assets/images/image_achievement_table.png new file mode 100644 index 0000000..19f43c4 Binary files /dev/null and b/assets/images/image_achievement_table.png differ diff --git a/assets/images/image_achievement_unlocked.png b/assets/images/image_achievement_unlocked.png new file mode 100644 index 0000000..ec6ea90 Binary files /dev/null and b/assets/images/image_achievement_unlocked.png differ diff --git a/assets/images/image_analysis.png b/assets/images/image_analysis.png new file mode 100644 index 0000000..ec5402d Binary files /dev/null and b/assets/images/image_analysis.png differ diff --git a/assets/images/image_game_card.png b/assets/images/image_game_card.png new file mode 100644 index 0000000..06ce7a5 Binary files /dev/null and b/assets/images/image_game_card.png differ diff --git a/assets/images/image_newgame_modal(1).png b/assets/images/image_newgame_modal(1).png new file mode 100644 index 0000000..c87aebb Binary files /dev/null and b/assets/images/image_newgame_modal(1).png differ diff --git a/assets/images/image_profile.png b/assets/images/image_profile.png new file mode 100644 index 0000000..2bcba31 Binary files /dev/null and b/assets/images/image_profile.png differ diff --git a/assets/images/image_spare_card.png b/assets/images/image_spare_card.png new file mode 100644 index 0000000..c896949 Binary files /dev/null and b/assets/images/image_spare_card.png differ diff --git a/assets/images/image_strike_card.png b/assets/images/image_strike_card.png new file mode 100644 index 0000000..bdb51bb Binary files /dev/null and b/assets/images/image_strike_card.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png index dc9ada4..0e4a9d9 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png index 28c6bf0..56b3f92 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png index 2ccbfd9..9fc0676 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png index f091b6b..d9b1f0c 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png index 4cde121..3f5c8f9 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png index d0ef06e..2745147 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png index dcdc230..459f32f 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png index 2ccbfd9..9fc0676 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png index c8f9ed8..12a500e 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png index a6d6b86..f22ef12 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png new file mode 100644 index 0000000..476aa2c Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png new file mode 100644 index 0000000..76e6312 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png new file mode 100644 index 0000000..bc049a0 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png new file mode 100644 index 0000000..f2c6638 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png index a6d6b86..f22ef12 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png index 75b2d16..fac200c 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png new file mode 100644 index 0000000..dce8bec Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png new file mode 100644 index 0000000..ed2e637 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png index c4df70d..8e7b362 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png index 6a84f41..0cbd661 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png index d0e1f58..0fc972a 100644 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/lib/main.dart b/lib/main.dart index 5ebae56..ab17985 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,12 +1,46 @@ +import 'package:bowl_in/views/game_screen.dart'; import 'package:bowl_in/views/main_screen.dart'; +import 'package:bowl_in/views/rank_screen.dart'; import 'package:bowl_in/views/welcome_screen.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; +import 'package:go_router/go_router.dart'; void main() { runApp(const MyApp()); } +final GoRouter _router = GoRouter( + routes: [ + GoRoute( + path: '/', + builder: (BuildContext context, GoRouterState state) { + return const MainScreen(); + }, + routes: [ + GoRoute( + path: 'games', + builder: (BuildContext context, GoRouterState state) { + return const GameScreen(); + }, + ), + GoRoute( + path: 'ranking', + builder: (BuildContext context, GoRouterState state) { + return const RankScreen(); + }, + ), + GoRoute( + path: 'splash', + builder: (BuildContext context, GoRouterState state) { + return const WelcomeScreen(); + }, + ), + ], + ), + ], +); + class MyApp extends StatelessWidget { const MyApp({super.key}); diff --git a/lib/presentation/gradientText.dart b/lib/presentation/gradientText.dart new file mode 100644 index 0000000..1fceb53 --- /dev/null +++ b/lib/presentation/gradientText.dart @@ -0,0 +1,24 @@ +import 'package:flutter/material.dart'; + +class GradientText extends StatelessWidget { + const GradientText( + this.text, { + required this.gradient, + this.style, + }); + + final String text; + final TextStyle? style; + final Gradient gradient; + + @override + Widget build(BuildContext context) { + return ShaderMask( + blendMode: BlendMode.srcIn, + shaderCallback: (bounds) => gradient.createShader( + Rect.fromLTWH(0, 0, bounds.width, bounds.height), + ), + child: Text(text, style: style), + ); + } +} diff --git a/lib/views/analysis_screen.dart b/lib/views/analysis_screen.dart new file mode 100644 index 0000000..7defc1f --- /dev/null +++ b/lib/views/analysis_screen.dart @@ -0,0 +1,100 @@ +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +import '../widgets/analysis_card.dart'; +import '../widgets/scores_list_widget.dart'; + +class AnalysisScreen extends StatefulWidget { + const AnalysisScreen({Key? key}) : super(key: key); + + @override + State createState() => _AnalysisScreenState(); +} + +class _AnalysisScreenState extends State { + @override + Widget build(BuildContext context) { + return ScrollConfiguration( + behavior: CustomScroll(), + child: SingleChildScrollView( + child: Stack(alignment: Alignment.topCenter, children: [ + Container( + width: MediaQuery.of(context).size.width, + height: MediaQuery.of(context).size.height * 1.45, + decoration: const BoxDecoration( + gradient: LinearGradient( + begin: Alignment.topLeft, + end: Alignment.bottomRight, + colors: [ + Color(0xff19BDE0), + Color(0xff4A17DC), + ], + )), + ), + Image.asset("assets/images/background_analysis.png"), + Positioned( + top: 150, + child: SizedBox( + width: MediaQuery.of(context).size.width, + height: 180, + child: Stack( + alignment: Alignment.center, + children: [ + Positioned( + left: 34, + child: SpareCard(score: 12), + ), + Positioned( + top: 0, + child: StrikeCard(score: 12), + ), + Positioned( + right: 34, + child: GameCard(score: 12), + ) + ], + ), + )), + Align( + alignment: AlignmentDirectional.topCenter, + child: Container( + height: 120, + decoration: BoxDecoration( + image: DecorationImage( + image: AssetImage("assets/images/image_analysis.png"), + )), + child: Center( + child: Text( + "Analysis", + style: TextStyle( + fontWeight: FontWeight.bold, + color: Color(0xff1ABAE0), + fontSize: 20), + )), + ), + ), + Positioned( + bottom: 100, + child: Wrap( + direction: Axis.vertical, + spacing: 10, + verticalDirection: VerticalDirection.up, + children: [ + StatsCard(title: "Average", val: 12), + StatsCard(title: "Average", val: 12), + StatsCard(title: "Average", val: 12), + StatsCard(title: "Average", val: 12), + StatsCard(title: "Average", val: 12), + StatsCard(title: "Average", val: 12), + StatsCard(title: "Average", val: 12), + StatsCard(title: "Average", val: 12), + StatsCard(title: "Average", val: 12), + StatsCard(title: "Average", val: 12), + StatsCard(title: "Average", val: 12), + StatsCard(title: "Average", val: 12), + ], + )) + ]), + )); + } +} diff --git a/lib/views/main_screen.dart b/lib/views/main_screen.dart index 124a1e3..a9a4776 100644 --- a/lib/views/main_screen.dart +++ b/lib/views/main_screen.dart @@ -1,10 +1,10 @@ import 'package:bowl_in/presentation/font.dart'; +import 'package:bowl_in/views/profile_screen.dart'; import 'package:bowl_in/views/rank_screen.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import '../widgets/button_new_party.dart'; -import '../widgets/scores_list_widget.dart'; +import 'analysis_screen.dart'; import 'game_screen.dart'; class MainScreen extends StatefulWidget { @@ -15,21 +15,18 @@ class MainScreen extends StatefulWidget { } class _MainScreenState extends State { - int _index = 0; - int get index => _index; - - final screens = [ - const GameScreen(), - const RankScreen(), - const RankScreen(), - const RankScreen(), - ]; + int currentPageIndex = 0; @override Widget build(BuildContext context) { return Scaffold( extendBody: true, resizeToAvoidBottomInset: false, - body: screens[_index], + body: [ + GameScreen(), + RankScreen(), + AnalysisScreen(), + ProfileScreen() + ][currentPageIndex], bottomNavigationBar: SizedBox( height: 75, child: NavigationBarTheme( @@ -52,12 +49,12 @@ class _MainScreenState extends State { ), child: NavigationBar( animationDuration: const Duration(microseconds: 800), - selectedIndex: index, + selectedIndex: currentPageIndex, labelBehavior: NavigationDestinationLabelBehavior.alwaysHide, height: MediaQuery.of(context).size.height * 0.1, onDestinationSelected: (index) => - setState(() => _index = index), + setState(() => currentPageIndex = index), backgroundColor: Colors.white, destinations: const [ NavigationDestination( @@ -74,26 +71,26 @@ class _MainScreenState extends State { ), NavigationDestination( icon: Icon( - Icons.show_chart, + BowlInFont.rank_icon, color: Colors.grey, - size: 25, + size: 21, ), label: '', selectedIcon: Icon( - Icons.show_chart, - size: 25, + BowlInFont.rank_icon, + size: 21, ), ), NavigationDestination( icon: Icon( - BowlInFont.rank_icon, + Icons.show_chart, color: Colors.grey, - size: 21, + size: 25, ), label: '', selectedIcon: Icon( - BowlInFont.rank_icon, - size: 21, + Icons.show_chart, + size: 25, ), ), NavigationDestination( diff --git a/lib/views/profile_screen.dart b/lib/views/profile_screen.dart new file mode 100644 index 0000000..e87c627 --- /dev/null +++ b/lib/views/profile_screen.dart @@ -0,0 +1,59 @@ +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +import '../widgets/achievements_list_widget.dart'; + +class ProfileScreen extends StatefulWidget { + const ProfileScreen({Key? key}) : super(key: key); + + @override + State createState() => _ProfileScreenState(); +} + +class _ProfileScreenState extends State { + @override + Widget build(BuildContext context) { + return Stack(alignment: Alignment.topCenter, children: [ + Container( + width: MediaQuery.of(context).size.width, + height: MediaQuery.of(context).size.height * 1.45, + decoration: const BoxDecoration( + gradient: LinearGradient( + begin: Alignment.topLeft, + end: Alignment.bottomRight, + colors: [ + Color(0xff19BDE0), + Color(0xff4A17DC), + ]))), + Align( + alignment: AlignmentDirectional.topCenter, + child: Container( + height: 120, + decoration: BoxDecoration( + image: DecorationImage( + image: AssetImage("assets/images/image_profile.png"), + )), + child: Center( + child: Text( + "Profile", + style: TextStyle( + fontWeight: FontWeight.bold, color: Colors.white, fontSize: 20), + )), + ), + ), + Padding( + padding: EdgeInsets.fromLTRB(0, 0, 0, 100), + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.start, + verticalDirection: VerticalDirection.up, + children: [ + ListAchievementWidget(nbUnlocked: 1), + Padding( + padding: EdgeInsets.fromLTRB(40, 0, 0, 0), + child: ProfileWidget()), + ], + )), + ]); + } +} diff --git a/lib/widgets/achievements_list_widget.dart b/lib/widgets/achievements_list_widget.dart new file mode 100644 index 0000000..72f7d7b --- /dev/null +++ b/lib/widgets/achievements_list_widget.dart @@ -0,0 +1,231 @@ +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:google_fonts/google_fonts.dart'; + +class AchievementWidget extends StatelessWidget { + final String imagePath; + final String imagePathUnlocked; + final int isUnlocked; + const AchievementWidget( + {Key? key, + required this.imagePath, + required this.imagePathUnlocked, + required this.isUnlocked}) + : super(key: key); + + @override + Widget build(BuildContext context) { + return Container( + width: 100, + height: 100, + decoration: BoxDecoration( + image: DecorationImage( + image: this.isUnlocked == 0 + ? AssetImage(this.imagePath) + : AssetImage(this.imagePathUnlocked), + ), + ), + ); + } +} + +class ListAchievementWidget extends StatelessWidget { + final int nbUnlocked; + const ListAchievementWidget({Key? key, required this.nbUnlocked}) + : super(key: key); + + @override + Widget build(BuildContext context) { + return Column( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.end, + children: [ + Container( + width: 520, + height: 520, + decoration: BoxDecoration( + image: DecorationImage( + image: AssetImage("assets/images/image_achievement_table.png"), + ), + ), + child: Padding( + padding: EdgeInsets.fromLTRB(0, 65, 0, 0), + child: Wrap( + alignment: WrapAlignment.center, + runSpacing: 15, + spacing: -5, + children: [ + Container( + width: double.infinity, + child: Center( + child: Padding( + padding: EdgeInsets.fromLTRB(200, 0, 0, 30), + child: RotationTransition( + turns: new AlwaysStoppedAnimation(5 / 360), + child: Text( + this.nbUnlocked.toString() + "/9 unlocked", + style: GoogleFonts.roboto( + fontWeight: FontWeight.bold, + fontStyle: FontStyle.italic, + fontSize: 13, + color: Color(0xff2461B2)), + )), + ), + ), + ), + AchievementWidget( + imagePath: 'assets/images/image_achievement_card.png', + imagePathUnlocked: + 'assets/images/image_achievement_unlocked.png', + isUnlocked: 0, + ), + AchievementWidget( + imagePath: 'assets/images/image_achievement_card.png', + imagePathUnlocked: + 'assets/images/image_achievement_unlocked.png', + isUnlocked: 1, + ), + AchievementWidget( + imagePath: 'assets/images/image_achievement_card.png', + imagePathUnlocked: + 'assets/images/image_achievement_unlocked.png', + isUnlocked: 0, + ), + AchievementWidget( + imagePath: 'assets/images/image_achievement_card.png', + imagePathUnlocked: + 'assets/images/image_achievement_unlocked.png', + isUnlocked: 0, + ), + AchievementWidget( + imagePath: 'assets/images/image_achievement_card.png', + imagePathUnlocked: + 'assets/images/image_achievement_unlocked.png', + isUnlocked: 1, + ), + AchievementWidget( + imagePath: 'assets/images/image_achievement_card.png', + imagePathUnlocked: + 'assets/images/image_achievement_unlocked.png', + isUnlocked: 1, + ), + AchievementWidget( + imagePath: 'assets/images/image_achievement_card.png', + imagePathUnlocked: + 'assets/images/image_achievement_unlocked.png', + isUnlocked: 1, + ), + AchievementWidget( + imagePath: 'assets/images/image_achievement_card.png', + imagePathUnlocked: + 'assets/images/image_achievement_unlocked.png', + isUnlocked: 0, + ), + AchievementWidget( + imagePath: 'assets/images/image_achievement_card.png', + imagePathUnlocked: + 'assets/images/image_achievement_unlocked.png', + isUnlocked: 0, + ), + ], + ), + )), + ], + ); + } +} + +class ProfileWidget extends StatelessWidget { + const ProfileWidget({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + return Row( + children: [ + Container( + height: 80, + width: 80, + decoration: BoxDecoration( + color: Colors.purple, + borderRadius: BorderRadius.all(Radius.circular(100)), + ), + ), + Padding( + padding: EdgeInsets.fromLTRB(20, 0, 0, 0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + "Lucas", + style: GoogleFonts.roboto( + color: Colors.white, + fontStyle: FontStyle.italic, + fontWeight: FontWeight.bold, + fontSize: 25), + ), + Padding( + padding: EdgeInsets.fromLTRB(0, 0, 0, 5), + child: RichText( + text: TextSpan( + text: '', + style: DefaultTextStyle.of(context).style, + children: [ + TextSpan( + text: "Highscore :", + style: GoogleFonts.roboto( + color: Colors.white.withOpacity(0.65), + fontStyle: FontStyle.italic, + fontWeight: FontWeight.bold, + fontSize: 15), + ), + TextSpan( + text: "122 pts", + style: GoogleFonts.roboto( + color: Color(0xffF40375).withOpacity(0.75), + fontStyle: FontStyle.italic, + fontWeight: FontWeight.w900, + fontSize: 20), + ), + ], + ), + ), + ), + RichText( + text: TextSpan( + text: '', + style: DefaultTextStyle.of(context).style, + children: [ + TextSpan( + text: "Last game ", + style: GoogleFonts.roboto( + color: Colors.white.withOpacity(0.65), + fontStyle: FontStyle.italic, + fontWeight: FontWeight.bold, + fontSize: 15), + ), + TextSpan( + text: "23", + style: GoogleFonts.roboto( + color: Colors.white, + fontStyle: FontStyle.italic, + fontWeight: FontWeight.bold, + fontSize: 15), + ), + TextSpan( + text: " days(s) ago", + style: GoogleFonts.roboto( + color: Colors.white.withOpacity(0.65), + fontStyle: FontStyle.italic, + fontWeight: FontWeight.bold, + fontSize: 15), + ), + ], + ), + ), + ], + ), + ) + ], + ); + } +} diff --git a/lib/widgets/analysis_card.dart b/lib/widgets/analysis_card.dart new file mode 100644 index 0000000..456b6c4 --- /dev/null +++ b/lib/widgets/analysis_card.dart @@ -0,0 +1,150 @@ +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:google_fonts/google_fonts.dart'; + +class SpareCard extends StatelessWidget { + final int score; + const SpareCard({Key? key, required this.score}) : super(key: key); + + @override + Widget build(BuildContext context) { + return Stack( + alignment: Alignment.center, + children: [ + Container( + width: 100, + height: 150, + decoration: BoxDecoration( + image: DecorationImage( + image: AssetImage("assets/images/image_spare_card.png"), + ), + )), + Padding( + padding: EdgeInsets.fromLTRB(0, 70, 0, 0), + child: Text( + this.score.toString(), + style: GoogleFonts.roboto( + fontWeight: FontWeight.bold, + color: Color(0xffF40375), + fontSize: 28), + ), + ) + ], + ); + } +} + +class StrikeCard extends StatelessWidget { + final int score; + const StrikeCard({Key? key, required this.score}) : super(key: key); + + @override + Widget build(BuildContext context) { + return Stack( + alignment: Alignment.center, + children: [ + Container( + height: 150, + width: 100, + decoration: BoxDecoration( + image: DecorationImage( + image: AssetImage("assets/images/image_strike_card.png"), + ), + )), + Padding( + padding: EdgeInsets.fromLTRB(0, 70, 0, 0), + child: Text( + this.score.toString(), + style: GoogleFonts.roboto( + fontWeight: FontWeight.bold, + color: Color(0xffF40375), + fontSize: 28), + ), + ) + ], + ); + } +} + +class GameCard extends StatelessWidget { + final int score; + const GameCard({Key? key, required this.score}) : super(key: key); + + @override + Widget build(BuildContext context) { + return Stack( + alignment: Alignment.center, + children: [ + Container( + height: 150, + width: 100, + decoration: BoxDecoration( + image: DecorationImage( + image: AssetImage("assets/images/image_game_card.png"), + ), + )), + Padding( + padding: EdgeInsets.fromLTRB(0, 60, 0, 0), + child: Text( + this.score.toString(), + style: GoogleFonts.roboto( + fontWeight: FontWeight.bold, + color: Color(0xffF40375), + fontSize: 28), + ), + ) + ], + ); + } +} + +class StatsCard extends StatelessWidget { + final String title; + final int val; + + const StatsCard({Key? key, required this.title, required this.val}) + : super(key: key); + + @override + Widget build(BuildContext context) { + return Container( + height: 50, + width: MediaQuery.of(context).size.width - 70, + decoration: BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(12)), + color: Colors.white, + boxShadow: [ + BoxShadow( + color: Colors.black.withOpacity(0.2), + spreadRadius: 1, + blurRadius: 8, + offset: Offset(0, 0), // changes position of shadow + ), + ], + ), + child: Padding( + padding: EdgeInsets.fromLTRB(20, 0, 20, 0), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + this.title, + style: GoogleFonts.roboto( + fontWeight: FontWeight.bold, + fontStyle: FontStyle.italic, + color: Color(0xff241E40), + fontSize: 18), + ), + Spacer(), + Text( + this.val.toString(), + style: GoogleFonts.roboto( + fontWeight: FontWeight.w900, + fontSize: 28, + color: Color(0xffF40375)), + ), + ], + ), + )); + } +} diff --git a/lib/widgets/button_new_party.dart b/lib/widgets/button_new_party.dart index 9665f46..a5283ff 100644 --- a/lib/widgets/button_new_party.dart +++ b/lib/widgets/button_new_party.dart @@ -36,7 +36,7 @@ class NewGameModal extends StatelessWidget { children: [ Transform.scale( scale: 1.14, - child: Image.asset("assets/images/image_newgame_modal.png")), + child: Image.asset("assets/images/image_newgame_modal(1).png")), SizedBox( height: 245, child: Column( diff --git a/lib/widgets/profil_listpodium_widget.dart b/lib/widgets/profil_listpodium_widget.dart index 443c46d..9190ab9 100644 --- a/lib/widgets/profil_listpodium_widget.dart +++ b/lib/widgets/profil_listpodium_widget.dart @@ -58,7 +58,7 @@ class ProfilPodiumWidget extends StatelessWidget { ), child: Center( child: Text( - this.score.toString(), + this.score.toString() + " pts", style: GoogleFonts.roboto( color: Colors.white, fontStyle: FontStyle.italic, diff --git a/pubspec.lock b/pubspec.lock index edd0b89..3cf7727 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1,6 +1,20 @@ # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: + archive: + dependency: transitive + description: + name: archive + url: "https://pub.dartlang.org" + source: hosted + version: "3.3.5" + args: + dependency: transitive + description: + name: args + url: "https://pub.dartlang.org" + source: hosted + version: "2.3.2" async: dependency: transitive description: @@ -22,6 +36,20 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.2.1" + checked_yaml: + dependency: transitive + description: + name: checked_yaml + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.2" + cli_util: + dependency: transitive + description: + name: cli_util + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.5" clock: dependency: transitive description: @@ -36,6 +64,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.16.0" + convert: + dependency: transitive + description: + name: convert + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.1" crypto: dependency: transitive description: @@ -76,6 +111,13 @@ packages: description: flutter source: sdk version: "0.0.0" + flutter_launcher_icons: + dependency: "direct dev" + description: + name: flutter_launcher_icons + url: "https://pub.dartlang.org" + source: hosted + version: "0.11.0" flutter_lints: dependency: "direct dev" description: @@ -88,6 +130,18 @@ packages: description: flutter source: sdk version: "0.0.0" + flutter_web_plugins: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + go_router: + dependency: "direct main" + description: + name: go_router + url: "https://pub.dartlang.org" + source: hosted + version: "6.0.1" google_fonts: dependency: "direct main" description: @@ -109,6 +163,27 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "4.0.2" + image: + dependency: transitive + description: + name: image + url: "https://pub.dartlang.org" + source: hosted + version: "3.3.0" + js: + dependency: transitive + description: + name: js + url: "https://pub.dartlang.org" + source: hosted + version: "0.6.4" + json_annotation: + dependency: transitive + description: + name: json_annotation + url: "https://pub.dartlang.org" + source: hosted + version: "4.8.0" lints: dependency: transitive description: @@ -116,6 +191,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.0.1" + logging: + dependency: transitive + description: + name: logging + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0" matcher: dependency: transitive description: @@ -186,6 +268,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.1.3" + petitparser: + dependency: transitive + description: + name: petitparser + url: "https://pub.dartlang.org" + source: hosted + version: "5.1.0" platform: dependency: transitive description: @@ -200,6 +289,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.1.3" + pointycastle: + dependency: transitive + description: + name: pointycastle + url: "https://pub.dartlang.org" + source: hosted + version: "3.6.2" process: dependency: transitive description: @@ -289,6 +385,20 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.2.0+3" + xml: + dependency: transitive + description: + name: xml + url: "https://pub.dartlang.org" + source: hosted + version: "6.1.0" + yaml: + dependency: transitive + description: + name: yaml + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.1" sdks: dart: ">=2.18.2 <3.0.0" - flutter: ">=3.0.0" + flutter: ">=3.3.0" diff --git a/pubspec.yaml b/pubspec.yaml index 0380f6b..35ff822 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -38,17 +38,25 @@ dependencies: cupertino_icons: ^1.0.2 simple_gradient_text: ^1.2.4 google_fonts: ^3.0.1 + go_router: ^6.0.1 dev_dependencies: flutter_test: sdk: flutter + flutter_launcher_icons: ^0.11.0 + # The "flutter_lints" package below contains a set of recommended lints to # encourage good coding practices. The lint set provided by the package is # activated in the `analysis_options.yaml` file located at the root of your # package. See that file for information about deactivating specific lint # rules and activating additional ones. flutter_lints: ^2.0.0 +flutter_icons: + android: true + ios: true + image_path: "assets/images/icon.png" + # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec