35 lines
983 B
Dart
35 lines
983 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
|
import 'package:mchess/chess_bloc/chess_bloc.dart';
|
|
import 'package:mchess/chess_bloc/promotion_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 MultiBlocProvider(
|
|
providers: [
|
|
BlocProvider(
|
|
create: (_) => ConnectionCubit.getInstance(),
|
|
),
|
|
BlocProvider(
|
|
create: (context) => ChessBloc.getInstance(),
|
|
),
|
|
BlocProvider(
|
|
create: (context) => PromotionBloc.getInstance(),
|
|
)
|
|
],
|
|
child: MaterialApp.router(
|
|
theme: ThemeData.dark(
|
|
useMaterial3: true,
|
|
),
|
|
routerConfig: ChessAppRouter.getInstance().router,
|
|
title: 'mChess 0.1.1340',
|
|
),
|
|
);
|
|
}
|
|
}
|