|
|
@@ -109,21 +109,40 @@ class RecordListState extends State<RecordList> {
|
|
|
);
|
|
|
}
|
|
|
return houseItem(
|
|
|
- roomInfo: playerList[index].houseInfo,
|
|
|
- gameInfo: playerList[index].gameInfo,
|
|
|
- );
|
|
|
+ roomInfo: playerList[index].houseInfo,
|
|
|
+ gameInfo: playerList[index].gameInfo,
|
|
|
+ playerInfo: playerList[index]);
|
|
|
})),
|
|
|
));
|
|
|
}
|
|
|
}
|
|
|
|
|
|
class houseItem extends StatelessWidget {
|
|
|
- houseItem({Key key, this.roomInfo, this.gameInfo}) : super(key: key);
|
|
|
+ houseItem({Key key, this.roomInfo, this.gameInfo, this.playerInfo})
|
|
|
+ : super(key: key);
|
|
|
final HouseInfo roomInfo;
|
|
|
final GameInfo gameInfo;
|
|
|
+ final PlayerInfo playerInfo;
|
|
|
+
|
|
|
@override
|
|
|
Widget build(BuildContext context) {
|
|
|
- if(roomInfo==null){
|
|
|
+ List imageList = [
|
|
|
+ 'images/zhanji_icon_01.png',
|
|
|
+ 'images/zhanji_icon_02.png',
|
|
|
+ 'images/zhanji_icon_03.png',
|
|
|
+ 'images/zhanji_icon_04.png'
|
|
|
+ ];
|
|
|
+ String imageSrc = '';
|
|
|
+ print('****');
|
|
|
+ print(playerInfo.rank);
|
|
|
+ if (playerInfo.rank != null && playerInfo.rank != 0) {
|
|
|
+ if (playerInfo.rank < 4) {
|
|
|
+ imageSrc = imageList[playerInfo.rank - 1];
|
|
|
+ } else {
|
|
|
+ imageSrc = imageList[3];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (roomInfo == null) {
|
|
|
return Container();
|
|
|
}
|
|
|
return Container(
|
|
|
@@ -194,23 +213,7 @@ class houseItem extends StatelessWidget {
|
|
|
],
|
|
|
),
|
|
|
),
|
|
|
- Row(
|
|
|
- mainAxisAlignment: MainAxisAlignment.center,
|
|
|
- children: <Widget>[
|
|
|
- Image.asset('images/icon_renshu.png', width: 20),
|
|
|
- Text(
|
|
|
- (roomInfo.playerNumber != null
|
|
|
- ? roomInfo.playerNumber.toString()
|
|
|
- : '0') +
|
|
|
- '/' +
|
|
|
- roomInfo.maxNumber.toString(),
|
|
|
- style: TextStyle(
|
|
|
- fontSize: 14,
|
|
|
- fontWeight: FontWeight.w500,
|
|
|
- color: Color(0xFFB1B2C0)),
|
|
|
- )
|
|
|
- ],
|
|
|
- )
|
|
|
+ // Image.asset(imageSrc,width:70)
|
|
|
],
|
|
|
),
|
|
|
),
|