mchess-client/lib/chess/chess_app.dart

27 lines
765 B
Dart
Raw Normal View History

import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:mchess/chess_bloc/chess_bloc.dart';
import 'package:mchess/connection_cubit/connection_cubit.dart';
import 'package:mchess/utils/chess_router.dart';
class ChessApp extends StatelessWidget {
const ChessApp({super.key});
@override
Widget build(BuildContext context) {
return BlocProvider(
create: (_) => ConnectionCubit.getInstance(),
child: BlocProvider(
create: (_) => ChessBloc.getInstance(),
2022-12-25 19:18:50 +00:00
child: MaterialApp.router(
2022-12-25 19:30:42 +00:00
theme: ThemeData.dark(
useMaterial3: true,
),
routerConfig: ChessAppRouter.getInstance().router,
title: 'mChess',
),
),
);
}
}