import 'package:flutter/material.dart'; import '../models/game_manager.dart'; import '../pages/home_page.dart'; /// 棋盘 class Board extends StatefulWidget { const Board({Key? key}) : super(key: key); @override State createState() => BoardState(); } class BoardState extends State { @override Widget build(BuildContext context) { GameManager gamer = context.findAncestorStateOfType()!.gamer; return SizedBox( width: gamer.skin.width, height: gamer.skin.height, child: Image.asset(gamer.skin.boardImage), ); } }