PIbd-32_Bulatova_K._R._PMU/lib/main.dart

35 lines
1.0 KiB
Dart
Raw Normal View History

2024-09-18 17:00:02 +04:00
import 'package:flutter/material.dart';
import 'package:project1/presentation/home_page/home_page.dart';
2024-10-17 14:00:22 +04:00
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:project1/presentation/home_page/bloc/bloc.dart';
import 'data/repositories/potter_repository.dart';
2024-09-18 17:00:02 +04:00
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
2024-09-22 21:49:20 +04:00
@override
2024-09-18 17:00:02 +04:00
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
debugShowCheckedModeBanner: false,
2024-09-18 17:00:02 +04:00
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.pink),
useMaterial3: true,
),
2024-10-17 14:00:22 +04:00
home: RepositoryProvider<PotterRepository>(
lazy: true,
create: (_) => PotterRepository(),
child: BlocProvider<HomeBloc>(
lazy: false,
create: (context) => HomeBloc(context.read<PotterRepository>()),
child: const MyHomePage(title: 'Булатова Каринa Раилевна'),
),
),
2024-09-18 17:00:02 +04:00
);
}
}