import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:test_app/data/repository/potter_repository.dart'; import 'package:test_app/view/home_page/bloc/bloc.dart'; import 'package:test_app/view/home_page/home_page.dart'; import 'package:test_app/view/home_page/like_bloc/like_bloc.dart'; void main() { runApp(const MyApp()); } class MyApp extends StatelessWidget { const MyApp({super.key}); @override Widget build(BuildContext context) { return MaterialApp( title: 'My Test App', debugShowCheckedModeBanner: false, theme: ThemeData( colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple), useMaterial3: true, ), home: RepositoryProvider( lazy: true, create: (_) => PotterRepository(), child: BlocProvider( lazy: true, create: (context) => HomeBloc(context.read()), child: BlocProvider( lazy: true, create: (context) => LikeBloc(), child: const MyHomePage(title: 'My Test App'), ), ), )); } }