вернула апи потера
This commit is contained in:
parent
6129789048
commit
89b3891506
@ -35,15 +35,15 @@ class MyApp extends StatelessWidget {
|
||||
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
|
||||
useMaterial3: true,
|
||||
),
|
||||
home: RepositoryProvider<PokeRepository>(
|
||||
home: RepositoryProvider<PotterRepository>(
|
||||
lazy: true,
|
||||
create: (_) => PokeRepository(),
|
||||
create: (_) => PotterRepository(),
|
||||
child: BlocProvider<LikeBloc>(
|
||||
lazy: false,
|
||||
create: (context) => LikeBloc(),
|
||||
child: BlocProvider<HomeBloc>(
|
||||
lazy: false,
|
||||
create: (context) => HomeBloc(context.read<PokeRepository>()),
|
||||
create: (context) => HomeBloc(context.read<PotterRepository>()),
|
||||
child: const MyHomePage(title: 'Чубыкина Полина Павловна'),
|
||||
),
|
||||
),
|
||||
|
@ -6,8 +6,8 @@ import 'package:mobilki_lab1/presentation/home_page/bloc/state.dart';
|
||||
import '../../../data/repositories/pokemon_repository.dart';
|
||||
|
||||
class HomeBloc extends Bloc<HomeEvent, HomeState> {
|
||||
// final PotterRepository repo;
|
||||
final PokeRepository repo;
|
||||
final PotterRepository repo;
|
||||
// final PokeRepository repo;
|
||||
|
||||
HomeBloc(this.repo) : super(const HomeState()) {
|
||||
on<HomeLoadDataEvent>(_onLoadData);
|
||||
|
Loading…
Reference in New Issue
Block a user