|
|
@ -17,9 +17,7 @@ class CardGame extends StatelessWidget {
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
initializeDateFormatting();
|
|
|
|
initializeDateFormatting();
|
|
|
|
return Padding(
|
|
|
|
return GestureDetector(
|
|
|
|
padding: EdgeInsets.fromLTRB(41, 0, 41, 10),
|
|
|
|
|
|
|
|
child: GestureDetector(
|
|
|
|
|
|
|
|
child: Stack(
|
|
|
|
child: Stack(
|
|
|
|
alignment: AlignmentDirectional.centerEnd,
|
|
|
|
alignment: AlignmentDirectional.centerEnd,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
@ -37,8 +35,59 @@ class CardGame extends StatelessWidget {
|
|
|
|
image: AssetImage("assets/images/card_game.png"),
|
|
|
|
image: AssetImage("assets/images/card_game.png"),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
child: Stack(
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
Positioned(
|
|
|
|
|
|
|
|
top: 0,
|
|
|
|
|
|
|
|
right: 0,
|
|
|
|
|
|
|
|
child: Row(
|
|
|
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.end,
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
Toast(
|
|
|
|
|
|
|
|
value: DateFormat('dd MMMM', 'fr_FR')
|
|
|
|
|
|
|
|
.format(game.date)),
|
|
|
|
|
|
|
|
Toast(value: DateFormat('HH:mm').format(game.date)),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
)),
|
|
|
|
|
|
|
|
Positioned(
|
|
|
|
|
|
|
|
left: 0,
|
|
|
|
|
|
|
|
top: 0,
|
|
|
|
child: Padding(
|
|
|
|
child: Padding(
|
|
|
|
padding: EdgeInsets.fromLTRB(120, 0, 3, 0),
|
|
|
|
padding: EdgeInsets.fromLTRB(10, 35, 0, 0),
|
|
|
|
|
|
|
|
child: SizedBox(
|
|
|
|
|
|
|
|
width: 130,
|
|
|
|
|
|
|
|
child: Wrap(
|
|
|
|
|
|
|
|
spacing: 5,
|
|
|
|
|
|
|
|
runSpacing: 5,
|
|
|
|
|
|
|
|
children: game.players
|
|
|
|
|
|
|
|
.map((e) => ProfilPicture(
|
|
|
|
|
|
|
|
path: e.image.toString(),
|
|
|
|
|
|
|
|
))
|
|
|
|
|
|
|
|
.toList())),
|
|
|
|
|
|
|
|
)),
|
|
|
|
|
|
|
|
Positioned(
|
|
|
|
|
|
|
|
right: 0,
|
|
|
|
|
|
|
|
bottom: 0,
|
|
|
|
|
|
|
|
child: Padding(
|
|
|
|
|
|
|
|
padding: EdgeInsets.fromLTRB(0, 25, 15, 0),
|
|
|
|
|
|
|
|
child: GradientText(
|
|
|
|
|
|
|
|
game.pointsCurrentUser.toString(),
|
|
|
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
fontSize: 40.0,
|
|
|
|
|
|
|
|
fontWeight: FontWeight.w900,
|
|
|
|
|
|
|
|
fontStyle: FontStyle.italic,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
gradientType: GradientType.linear,
|
|
|
|
|
|
|
|
gradientDirection: GradientDirection.ttb,
|
|
|
|
|
|
|
|
radius: 2.5,
|
|
|
|
|
|
|
|
colors: [
|
|
|
|
|
|
|
|
Color(0xff181818),
|
|
|
|
|
|
|
|
Color(0xff626262),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
)),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
Positioned(
|
|
|
|
|
|
|
|
right: 0,
|
|
|
|
child: ClipRect(
|
|
|
|
child: ClipRect(
|
|
|
|
clipBehavior: Clip.hardEdge,
|
|
|
|
clipBehavior: Clip.hardEdge,
|
|
|
|
child: Opacity(
|
|
|
|
child: Opacity(
|
|
|
@ -81,64 +130,9 @@ class CardGame extends StatelessWidget {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
))),
|
|
|
|
))),
|
|
|
|
)),
|
|
|
|
)
|
|
|
|
Column(
|
|
|
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
Padding(
|
|
|
|
|
|
|
|
padding: EdgeInsets.fromLTRB(5, 3, 10, 3),
|
|
|
|
|
|
|
|
child: Row(
|
|
|
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.end,
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
Toast(
|
|
|
|
|
|
|
|
value: DateFormat('dd MMMM', 'fr_FR')
|
|
|
|
|
|
|
|
.format(game.date)),
|
|
|
|
|
|
|
|
Toast(value: DateFormat('HH:mm').format(game.date)),
|
|
|
|
|
|
|
|
],
|
|
|
|
],
|
|
|
|
)),
|
|
|
|
)),
|
|
|
|
Stack(
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
Row(
|
|
|
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.end,
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
Padding(
|
|
|
|
|
|
|
|
padding: EdgeInsets.fromLTRB(25, 15, 0, 0),
|
|
|
|
|
|
|
|
child: SizedBox(
|
|
|
|
|
|
|
|
width: 130,
|
|
|
|
|
|
|
|
child: Wrap(
|
|
|
|
|
|
|
|
spacing: 5,
|
|
|
|
|
|
|
|
runSpacing: 5,
|
|
|
|
|
|
|
|
children: game.players
|
|
|
|
|
|
|
|
.map((e) => ProfilPicture(
|
|
|
|
|
|
|
|
path: e.image.toString(),
|
|
|
|
|
|
|
|
))
|
|
|
|
|
|
|
|
.toList()))),
|
|
|
|
|
|
|
|
const Spacer(),
|
|
|
|
|
|
|
|
Padding(
|
|
|
|
|
|
|
|
padding: EdgeInsets.fromLTRB(0, 25, 15, 0),
|
|
|
|
|
|
|
|
child: GradientText(
|
|
|
|
|
|
|
|
game.pointsCurrentUser.toString(),
|
|
|
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
fontSize: 40.0,
|
|
|
|
|
|
|
|
fontWeight: FontWeight.w900,
|
|
|
|
|
|
|
|
fontStyle: FontStyle.italic,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
gradientType: GradientType.linear,
|
|
|
|
|
|
|
|
gradientDirection: GradientDirection.ttb,
|
|
|
|
|
|
|
|
radius: 2.5,
|
|
|
|
|
|
|
|
colors: [
|
|
|
|
|
|
|
|
Color(0xff181818),
|
|
|
|
|
|
|
|
Color(0xff626262),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
)),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
onTap: () {
|
|
|
|
onTap: () {
|
|
|
@ -146,11 +140,10 @@ class CardGame extends StatelessWidget {
|
|
|
|
context: context,
|
|
|
|
context: context,
|
|
|
|
builder: (BuildContext context) {
|
|
|
|
builder: (BuildContext context) {
|
|
|
|
return ScoreBoardModal(
|
|
|
|
return ScoreBoardModal(
|
|
|
|
gamedetail:
|
|
|
|
gamedetail: MyApp.controller.gameMgr.getGameById(game.id));
|
|
|
|
MyApp.controller.gameMgr.getGameById(game.id));
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
));
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -171,7 +164,9 @@ class ListCardGame extends StatelessWidget {
|
|
|
|
shrinkWrap: false,
|
|
|
|
shrinkWrap: false,
|
|
|
|
itemCount: MyApp.controller.userCurrent.games.length,
|
|
|
|
itemCount: MyApp.controller.userCurrent.games.length,
|
|
|
|
itemBuilder: (BuildContext context, int index) {
|
|
|
|
itemBuilder: (BuildContext context, int index) {
|
|
|
|
return CardGame(game: MyApp.controller.userCurrent.games[index]);
|
|
|
|
return Center(
|
|
|
|
|
|
|
|
child: CardGame(game: MyApp.controller.userCurrent.games[index]),
|
|
|
|
|
|
|
|
);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
));
|
|
|
|
));
|
|
|
|
}
|
|
|
|
}
|
|
|
|