push new binding
continuous-integration/drone/push Build is failing Details

pull/20/head
Lucas Delanier 2 years ago
parent 9aeca9c1de
commit b85825b81d

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

@ -6,6 +6,7 @@ import '../views/ingame_screen.dart';
import '../views/main_screen.dart';
import '../views/rank_screen.dart';
import '../views/welcome_screen.dart';
import '../widgets/ingame_widgets.dart';
final GoRouter router = GoRouter(
routes: <RouteBase>[
@ -36,7 +37,7 @@ final GoRouter router = GoRouter(
GoRoute(
path: 'in-game',
builder: (BuildContext context, GoRouterState state) {
return const InGameScreen();
return InGameScreen();
},
),
],

@ -24,8 +24,8 @@ class StubData extends IManager {
_initRounds();
_initGameDetails();
_initGame();
players[8].games = games;
userCurrent = players[8];
userCurrent = players[8] as User;
userCurrent.games = games;
}
IUserManager get userMgr => _userMgr;
@ -51,8 +51,7 @@ class StubData extends IManager {
Achievement("Win a game")
],
[],
Stat(10, 2, 12, 130, 7, 6, 700, 58.33, 30.2)
),
Stat(10, 2, 12, 130, 7, 6, 700, 58.33, 30.2)),
User(
9,
"Dave",
@ -64,8 +63,7 @@ class StubData extends IManager {
Achievement("Win a game")
],
[],
Stat(2, 7, 9, 80, 4, 3, 250, 27.77, 10.55)
)
Stat(2, 7, 9, 80, 4, 3, 250, 27.77, 10.55))
];
List<GameDetail> _gameDetails = [];

@ -29,23 +29,18 @@ class _GameScreenState extends State<GameScreen> {
],
)),
),
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),
)),
),
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,
@ -54,19 +49,14 @@ class _GameScreenState extends State<GameScreen> {
mainAxisAlignment: MainAxisAlignment.center,
children: [
ButtonNewParty(),
SizedBox(width: 20),
const 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(),
)),
Container(
height: MediaQuery.of(context).size.height - 140,
width: MediaQuery.of(context).size.width,
child: ListCardGame(),
),
],
)

@ -1,13 +1,16 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:go_router/go_router.dart';
import 'package:google_fonts/google_fonts.dart';
import 'ingame_widgets.dart';
class ButtonNewParty extends StatelessWidget {
@override
Widget build(BuildContext context) {
return ElevatedButton(
onPressed: () {},
onPressed: () => context.go('/in-game'),
child: Text("+ New game"),
style: ElevatedButton.styleFrom(
side: BorderSide(
@ -139,6 +142,65 @@ class NewGameModal extends StatelessWidget {
}
}
class ScoreBoardModal extends StatelessWidget {
const ScoreBoardModal({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_scoreboard.png")),
SizedBox(
height: 245,
child:
Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
Expanded(
child: Padding(
padding: EdgeInsets.fromLTRB(0, 40, 0, 0),
child: Stack(
alignment: Alignment.topCenter,
children: [
Positioned(
child: PodiumGameOverWidget(
isfirst: 2,
pseudo: 'Lucas',
score: 123,
),
top: 70,
left: 30,
),
Positioned(
child: PodiumGameOverWidget(
isfirst: 1,
pseudo: 'Momo',
score: 160,
),
top: 10,
),
Positioned(
child: PodiumGameOverWidget(
isfirst: 3,
pseudo: 'popo',
score: 110,
),
top: 70,
right: 30,
)
],
),
)),
]),
)
],
),
);
}
}
class ButtonJoinParty extends StatelessWidget {
@override
Widget build(BuildContext context) {

@ -1,4 +1,5 @@
import 'package:bowl_in/main.dart';
import 'package:bowl_in/widgets/button_new_party.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
@ -108,17 +109,17 @@ class CardGame extends StatelessWidget {
child: SizedBox(
width: 130,
child: Wrap(
spacing: 5,
runSpacing: 5,
children: game.playersId
.map((item) => ProfilPicture(
path: MyApp.controller.userMgr
.getUserById(item)
.image,
))
.toList(),
))),
Spacer(),
spacing: 5,
runSpacing: 5,
children: game.playersId
.map((e) => ProfilPicture(
path: MyApp.controller.userMgr
.getUserById(e)
.image
.toString(),
))
.toList()))),
const Spacer(),
Padding(
padding: EdgeInsets.fromLTRB(0, 30, 15, 0),
child: GradientText(
@ -144,7 +145,13 @@ class CardGame extends StatelessWidget {
),
],
),
onTap: () => context.go('/in-game'),
onTap: () {
showDialog(
context: context,
builder: (BuildContext context) {
return ScoreBoardModal();
});
},
));
}
}

Loading…
Cancel
Save