parent
115f445029
commit
eac7b475c5
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 104 KiB |
After Width: | Height: | Size: 8.4 KiB |
After Width: | Height: | Size: 41 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 13 KiB |
@ -0,0 +1,76 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../widgets/button_new_party.dart';
|
||||
import '../widgets/scores_list_widget.dart';
|
||||
|
||||
class GameScreen extends StatefulWidget {
|
||||
const GameScreen({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<GameScreen> createState() => _GameScreenState();
|
||||
}
|
||||
|
||||
class _GameScreenState extends State<GameScreen> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Stack(
|
||||
children: [
|
||||
Container(
|
||||
width: MediaQuery.of(context).size.width,
|
||||
height: MediaQuery.of(context).size.height,
|
||||
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_score.png"),
|
||||
)),
|
||||
child: Center(
|
||||
child: Text(
|
||||
"Scores",
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Colors.white,
|
||||
fontSize: 20),
|
||||
)),
|
||||
),
|
||||
),
|
||||
Column(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
ButtonNewParty(),
|
||||
SizedBox(width: 20),
|
||||
ButtonJoinParty(),
|
||||
],
|
||||
),
|
||||
Align(
|
||||
alignment: Alignment.bottomCenter,
|
||||
child: Positioned(
|
||||
bottom: 0,
|
||||
child: Container(
|
||||
height: MediaQuery.of(context).size.height - 140,
|
||||
width: MediaQuery.of(context).size.width,
|
||||
child: ListCardGame(),
|
||||
)),
|
||||
),
|
||||
],
|
||||
)
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,91 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../widgets/profil_listpodium_widget.dart';
|
||||
|
||||
class RankScreen extends StatefulWidget {
|
||||
const RankScreen({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<RankScreen> createState() => _RankScreenState();
|
||||
}
|
||||
|
||||
class _RankScreenState extends State<RankScreen> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Stack(alignment: Alignment.center, children: [
|
||||
Container(
|
||||
width: MediaQuery.of(context).size.width,
|
||||
height: MediaQuery.of(context).size.height,
|
||||
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_ranking.png"),
|
||||
)),
|
||||
child: Center(
|
||||
child: Text(
|
||||
"Ranking",
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold, color: Colors.white, fontSize: 20),
|
||||
)),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
top: 70,
|
||||
child: Stack(
|
||||
children: [
|
||||
Container(
|
||||
width: MediaQuery.of(context).size.width - 60,
|
||||
height: 500,
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage("assets/images/image_podium(1).png"),
|
||||
)),
|
||||
)
|
||||
],
|
||||
)),
|
||||
Positioned(
|
||||
left: 65,
|
||||
top: MediaQuery.of(context).size.height * 0.195,
|
||||
child: ProfilPodiumWidget(isfirst: 0, pseudo: "Louison", score: 122)),
|
||||
Positioned(
|
||||
top: MediaQuery.of(context).size.height * 0.114,
|
||||
child: Align(
|
||||
child: ProfilPodiumWidget(isfirst: 1, pseudo: "Lucas", score: 167),
|
||||
)),
|
||||
Positioned(
|
||||
right: 65,
|
||||
top: MediaQuery.of(context).size.height * 0.219,
|
||||
child: ProfilPodiumWidget(isfirst: 0, pseudo: "David", score: 102),
|
||||
),
|
||||
Positioned(
|
||||
bottom: -40,
|
||||
child: Stack(
|
||||
children: [
|
||||
Container(
|
||||
width: MediaQuery.of(context).size.width - 40,
|
||||
height: 500,
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage("assets/images/image_podium.png"),
|
||||
)),
|
||||
child: ListPodium(),
|
||||
)
|
||||
],
|
||||
)),
|
||||
]);
|
||||
}
|
||||
}
|
@ -0,0 +1,168 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
|
||||
class ButtonNewParty extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ElevatedButton(
|
||||
onPressed: () {},
|
||||
child: Text("+ New game"),
|
||||
style: ElevatedButton.styleFrom(
|
||||
side: BorderSide(
|
||||
width: 4,
|
||||
color: Color(0xffFF419B),
|
||||
),
|
||||
onPrimary: Colors.white,
|
||||
primary: Color(0xffF40375),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(35),
|
||||
),
|
||||
minimumSize: Size(130, 37),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class NewGameModal extends StatelessWidget {
|
||||
const NewGameModal({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Dialog(
|
||||
child: Stack(
|
||||
alignment: Alignment.topCenter,
|
||||
children: [
|
||||
Transform.scale(
|
||||
scale: 1.14,
|
||||
child: Image.asset("assets/images/image_newgame_modal.png")),
|
||||
SizedBox(
|
||||
height: 245,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.fromLTRB(0, 10, 0, 0),
|
||||
child: Text("Join game",
|
||||
style: GoogleFonts.roboto(
|
||||
fontWeight: FontWeight.w900, fontSize: 18)),
|
||||
),
|
||||
SizedBox(
|
||||
height: 40,
|
||||
),
|
||||
Image.asset(
|
||||
"assets/images/sentence_joingame.png",
|
||||
width: 240,
|
||||
),
|
||||
Spacer(),
|
||||
Padding(
|
||||
padding: EdgeInsets.fromLTRB(8, 8, 0, 8),
|
||||
child: Stack(
|
||||
alignment: Alignment.centerLeft,
|
||||
children: [
|
||||
Container(
|
||||
width: 290,
|
||||
height: 50,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xffF8F8F8),
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
boxShadow: [
|
||||
const BoxShadow(
|
||||
color: Colors.grey,
|
||||
),
|
||||
const BoxShadow(
|
||||
color: Colors.black,
|
||||
spreadRadius: -20.0,
|
||||
blurRadius: 12.0,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.fromLTRB(15, 0, 0, 0),
|
||||
child: TextField(
|
||||
maxLength: 6,
|
||||
decoration: new InputDecoration(
|
||||
hintText: 'Party code...',
|
||||
counterStyle: TextStyle(
|
||||
height: double.minPositive,
|
||||
),
|
||||
counterText: "",
|
||||
border: InputBorder.none,
|
||||
),
|
||||
style: GoogleFonts.roboto(
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Color(0xff989898)),
|
||||
),
|
||||
)
|
||||
],
|
||||
)),
|
||||
Stack(
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.fromLTRB(0, 3, 0, 0),
|
||||
child: Container(
|
||||
height: 50,
|
||||
width: 290,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xffB70056),
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
),
|
||||
),
|
||||
),
|
||||
ElevatedButton(
|
||||
onPressed: () => Navigator.pop(context),
|
||||
child: Text(
|
||||
"CONFIRM",
|
||||
style: GoogleFonts.roboto(
|
||||
fontWeight: FontWeight.bold, fontSize: 18),
|
||||
),
|
||||
style: ElevatedButton.styleFrom(
|
||||
onPrimary: Colors.white,
|
||||
primary: Color(0xffF40375),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
),
|
||||
minimumSize: Size(290, 45),
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class ButtonJoinParty extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ElevatedButton(
|
||||
onPressed: () {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return NewGameModal();
|
||||
});
|
||||
},
|
||||
child: Text("Join game"),
|
||||
style: ElevatedButton.styleFrom(
|
||||
side: BorderSide(
|
||||
width: 4,
|
||||
color: Color(0xff6B6588),
|
||||
),
|
||||
onPrimary: Colors.white,
|
||||
primary: Color(0xff45405D),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(35),
|
||||
),
|
||||
minimumSize: Size(130, 37),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,204 @@
|
||||
import 'package:bowl_in/widgets/scores_list_widget.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
|
||||
class ProfilPodiumWidget extends StatelessWidget {
|
||||
final int isfirst;
|
||||
final String pseudo;
|
||||
final int score;
|
||||
const ProfilPodiumWidget(
|
||||
{Key? key,
|
||||
required this.isfirst,
|
||||
required this.pseudo,
|
||||
required this.score})
|
||||
: super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Column(
|
||||
children: [
|
||||
Stack(
|
||||
clipBehavior: Clip.none,
|
||||
children: [
|
||||
Container(
|
||||
width: this.isfirst == 1 ? 65 : 50,
|
||||
height: this.isfirst == 1 ? 65 : 50,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.red,
|
||||
border: Border.all(width: 2.0, color: const Color(0xFFFFFFFF)),
|
||||
borderRadius: BorderRadius.all(Radius.circular(70)),
|
||||
),
|
||||
),
|
||||
if (isfirst == 1)
|
||||
Positioned(
|
||||
bottom: -5,
|
||||
right: -15,
|
||||
child: Image.asset(
|
||||
'assets/images/image_trophee.png',
|
||||
height: 40,
|
||||
width: 40,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.fromLTRB(0, 3, 0, 3),
|
||||
child: Text(
|
||||
this.pseudo,
|
||||
style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: 70,
|
||||
height: 25,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xff3618A0),
|
||||
borderRadius: BorderRadius.all(Radius.circular(70)),
|
||||
),
|
||||
child: Center(
|
||||
child: Text(
|
||||
this.score.toString(),
|
||||
style: GoogleFonts.roboto(
|
||||
color: Colors.white,
|
||||
fontStyle: FontStyle.italic,
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: 16),
|
||||
),
|
||||
)),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class ProfilListWidget extends StatelessWidget {
|
||||
final int position;
|
||||
final String pseudo;
|
||||
final int score;
|
||||
|
||||
const ProfilListWidget(
|
||||
{Key? key,
|
||||
required this.position,
|
||||
required this.pseudo,
|
||||
required this.score})
|
||||
: super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Padding(
|
||||
padding: EdgeInsets.fromLTRB(0, 0, 0, 9),
|
||||
child: Container(
|
||||
width: 300,
|
||||
height: 65,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.all(Radius.circular(17)),
|
||||
color: Colors.white,
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.fromLTRB(18, 0, 18, 0),
|
||||
child: Text(
|
||||
this.position.toString(),
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 14,
|
||||
color: Color(0xffBABABA),
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: 40,
|
||||
height: 40,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.all(Radius.circular(70)),
|
||||
color: Colors.grey,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.fromLTRB(10, 0, 0, 0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
this.pseudo,
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold, color: Color(0xff585858)),
|
||||
),
|
||||
Text(
|
||||
this.score.toString() + " points",
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold, color: Color(0xffBABABA)),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class ListPodium extends StatelessWidget {
|
||||
const ListPodium({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Padding(
|
||||
padding: EdgeInsets.fromLTRB(20, 80, 20, 0),
|
||||
child: SizedBox(
|
||||
height: 500,
|
||||
child: ScrollConfiguration(
|
||||
behavior: CustomScroll(),
|
||||
child: ListView(
|
||||
children: [
|
||||
ProfilListWidget(
|
||||
position: 4,
|
||||
pseudo: 'Emre',
|
||||
score: 35,
|
||||
),
|
||||
ProfilListWidget(
|
||||
position: 5,
|
||||
pseudo: 'Emre',
|
||||
score: 35,
|
||||
),
|
||||
ProfilListWidget(
|
||||
position: 6,
|
||||
pseudo: 'Emre',
|
||||
score: 35,
|
||||
),
|
||||
ProfilListWidget(
|
||||
position: 7,
|
||||
pseudo: 'Emre',
|
||||
score: 35,
|
||||
),
|
||||
ProfilListWidget(
|
||||
position: 8,
|
||||
pseudo: 'Emre',
|
||||
score: 35,
|
||||
),
|
||||
ProfilListWidget(
|
||||
position: 9,
|
||||
pseudo: 'Emre',
|
||||
score: 35,
|
||||
),
|
||||
ProfilListWidget(
|
||||
position: 10,
|
||||
pseudo: 'Emre',
|
||||
score: 35,
|
||||
),
|
||||
ProfilListWidget(
|
||||
position: 11,
|
||||
pseudo: 'Emre',
|
||||
score: 35,
|
||||
),
|
||||
SizedBox(
|
||||
height: 50,
|
||||
),
|
||||
],
|
||||
),
|
||||
)));
|
||||
}
|
||||
}
|
Loading…
Reference in new issue