Widget _buildGameItem(BuildContext context, int index) { var game = this.widget.viewModel.game; if (index == 0) { return(new GameBrief( game: game, () => TinyWasmPlugin.PushToTinyWasmScreen(url: game.redirectURL, name: game.resetLabel) )); } if (index == 1) { return(new GameImageGallery( game: game )); } if (index == 2) { return(new GameDescription( game: game )); } return(new Container()); }
Widget _buildGameCard(BuildContext context, int index) { var gameId = this.widget.viewModel.gameIds[index: index]; var rankDict = this.widget.viewModel.rankDict; if (!rankDict.ContainsKey(key: gameId)) { return new Container(); } var game = rankDict[key: gameId]; return new GameCard( game: game, () => this.widget.actionModel.pushToGameDetail(obj: game.id), () => TinyWasmPlugin.PushToTinyWasmScreen(url: game.redirectURL, name: game.resetLabel)); }
static Widget _buildPlayButton(RankData game) { return(new CustomButton( padding: EdgeInsets.zero, child: new Container( width: 60, height: 28, decoration: new BoxDecoration( color: CColors.PrimaryBlue, borderRadius: BorderRadius.all(14) ), alignment: Alignment.center, child: new Text( "开始", style: new TextStyle( fontSize: 14, fontFamily: "Roboto-Medium", color: CColors.White ) ) ), onPressed: () => TinyWasmPlugin.PushToTinyWasmScreen(url: game.redirectURL, name: game.resetLabel) )); }