28 lines
788 B
Dart
28 lines
788 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/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(),
|
|
child: Container(
|
|
color: Colors.amber,
|
|
padding: const EdgeInsets.all(2),
|
|
child: MaterialApp.router(
|
|
routerConfig: router,
|
|
title: 'mChess v0.1.1337',
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|