import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:pmu_lab_1/data/repositories/cats_repository.dart'; import 'package:pmu_lab_1/presentation/home_page/bloc/bloc.dart'; import 'package:pmu_lab_1/presentation/home_page/home_page.dart'; void main() { runApp(const MyApp()); } class MyApp extends StatelessWidget { const MyApp({super.key}); @override Widget build(BuildContext context) { return MaterialApp( title: 'Flutter Demo', theme: ThemeData( colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple), useMaterial3: true, ), home: RepositoryProvider( lazy: true, create: (_) => CatsRepository(), child: BlocProvider( lazy: false, create: (context) => HomeBloc(context.read()), child: const MyHomePage(title: 'PIbd31 Teryokhin'), ) ) ); } }