Make chessboard fit its window.
This commit is contained in:
parent
75727980a7
commit
b329cb10ad
@ -26,34 +26,35 @@ class ChessApp extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
child: Center(
|
child: Center(
|
||||||
|
child: FittedBox(
|
||||||
|
fit: BoxFit.contain,
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
FittedBox(
|
Container(
|
||||||
fit: BoxFit.contain,
|
margin: const EdgeInsets.all(20),
|
||||||
child: Container(
|
child: BlocProvider(
|
||||||
margin: const EdgeInsets.all(20),
|
create: (_) => ChessBloc.getInstance(),
|
||||||
child: BlocProvider(
|
child: BlocBuilder<ChessBloc, ChessBoardState>(
|
||||||
create: (_) => ChessBloc.getInstance(),
|
builder: (context, state) {
|
||||||
child: BlocBuilder<ChessBloc, ChessBoardState>(
|
return ChessBoard(
|
||||||
builder: (context, state) {
|
bState: 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());
|
|
||||||
},
|
|
||||||
)
|
|
||||||
],
|
|
||||||
)),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user