Make chessboard fit its window.

This commit is contained in:
Marco 2022-11-19 11:37:15 +01:00
parent 75727980a7
commit b329cb10ad

View File

@ -26,34 +26,35 @@ class ChessApp extends StatelessWidget {
),
),
child: Center(
child: FittedBox(
fit: BoxFit.contain,
child: Column(
children: [
FittedBox(
fit: BoxFit.contain,
child: Container(
margin: const EdgeInsets.all(20),
child: BlocProvider(
create: (_) => ChessBloc.getInstance(),
child: BlocBuilder<ChessBloc, ChessBoardState>(
builder: (context, state) {
return ChessBoard(
bState: state,
);
},
children: [
Container(
margin: const EdgeInsets.all(20),
child: BlocProvider(
create: (_) => ChessBloc.getInstance(),
child: BlocBuilder<ChessBloc, ChessBoardState>(
builder: (context, state) {
return ChessBoard(
bState: state,
);
},
),
),
),
),
StreamBuilder(
stream: ServerConnection.getInstance().channel.stream,
builder: (context, snapshot) {
return Text(
style: const TextStyle(color: Colors.white),
snapshot.data.toString());
},
)
],
),
StreamBuilder(
stream: ServerConnection.getInstance().channel.stream,
builder: (context, snapshot) {
return Text(
style: const TextStyle(color: Colors.white),
snapshot.data.toString());
},
)
],
)),
),
),
),
),
);