Before Width: | Height: | Size: 544 B After Width: | Height: | Size: 9.7 KiB |
Before Width: | Height: | Size: 442 B After Width: | Height: | Size: 5.4 KiB |
Before Width: | Height: | Size: 721 B After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 40 KiB |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 578 KiB |
After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 141 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 125 KiB |
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 39 KiB |
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 543 KiB |
Before Width: | Height: | Size: 564 B After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 7.4 KiB |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 7.0 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 5.7 KiB |
After Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 6.8 KiB |
After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 9.7 KiB |
After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 32 KiB |
@ -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),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
@ -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<AnalysisScreen> createState() => _AnalysisScreenState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _AnalysisScreenState extends State<AnalysisScreen> {
|
||||||
|
@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),
|
||||||
|
],
|
||||||
|
))
|
||||||
|
]),
|
||||||
|
));
|
||||||
|
}
|
||||||
|
}
|
@ -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<ProfileScreen> createState() => _ProfileScreenState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _ProfileScreenState extends State<ProfileScreen> {
|
||||||
|
@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()),
|
||||||
|
],
|
||||||
|
)),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
@ -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>[
|
||||||
|
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>[
|
||||||
|
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),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
@ -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)),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
));
|
||||||
|
}
|
||||||
|
}
|