import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; import 'package:mchess/utils/chess_utils.dart'; class PromotionDialog extends StatelessWidget { final ChessColor sideColor; const PromotionDialog({required this.sideColor, super.key}); @override Widget build(BuildContext context) { return Card( child: Column(children: [ Expanded( flex: 1, child: Row( children: [ ElevatedButton( onPressed: () {}, child: SvgPicture.asset(chessPiecesAssets[ChessPieceAssetKey( pieceClass: ChessPieceClass.queen, color: sideColor)]!), ), ElevatedButton( onPressed: () {}, child: SvgPicture.asset(chessPiecesAssets[ChessPieceAssetKey( pieceClass: ChessPieceClass.rook, color: sideColor)]!), ), ElevatedButton( onPressed: () {}, child: SvgPicture.asset(chessPiecesAssets[ChessPieceAssetKey( pieceClass: ChessPieceClass.knight, color: sideColor)]!), ), ElevatedButton( onPressed: () {}, child: SvgPicture.asset(chessPiecesAssets[ChessPieceAssetKey( pieceClass: ChessPieceClass.bishop, color: sideColor)]!), ) ], ), ), const Expanded( flex: 3, child: ColoredBox(color: Colors.red), ) ]), ); } }