mchess-client/lib/pages/prepare_chess_game.dart

25 lines
681 B
Dart

import 'dart:developer';
import 'package:flutter/material.dart';
import 'package:mchess/pages/chess_game.dart';
class PrepareChessGameWidget extends StatelessWidget {
final Future responseFutureForRegistering;
const PrepareChessGameWidget(
{required this.responseFutureForRegistering, super.key});
@override
Widget build(BuildContext context) {
return FutureBuilder(
future: responseFutureForRegistering,
builder: (context, snapshot) {
if (snapshot.connectionState == ConnectionState.done) {
log('future done');
return const ChessGame();
}
return const CircularProgressIndicator();
},
);
}
}