2024-09-17 20:55:24 +04:00
|
|
|
import 'package:flutter/material.dart';
|
2024-12-13 04:00:50 +04:00
|
|
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
2024-12-19 13:20:27 +04:00
|
|
|
import 'package:pmu/data/repositories/api_repository.dart';
|
2024-12-13 04:00:50 +04:00
|
|
|
import 'package:pmu/presentation/home_page/bloc/bloc.dart';
|
2024-11-26 15:44:55 +04:00
|
|
|
import 'package:pmu/presentation/home_page/home_page.dart';
|
2024-09-17 20:55:24 +04:00
|
|
|
|
|
|
|
void main() {
|
|
|
|
runApp(const MyApp());
|
|
|
|
}
|
|
|
|
|
|
|
|
class MyApp extends StatelessWidget {
|
|
|
|
const MyApp({super.key});
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
2024-12-13 04:00:50 +04:00
|
|
|
return MaterialApp(
|
|
|
|
title: 'LoveSearch',
|
2024-12-19 13:20:27 +04:00
|
|
|
home: RepositoryProvider<ApiRepository>(
|
2024-12-13 04:00:50 +04:00
|
|
|
lazy: true,
|
2024-12-19 13:20:27 +04:00
|
|
|
create: (_) => ApiRepository(),
|
|
|
|
child: BlocProvider<HomeBloc>(
|
2024-12-13 04:00:50 +04:00
|
|
|
lazy: false,
|
2024-12-19 13:20:27 +04:00
|
|
|
create: (context) => HomeBloc(context.read<ApiRepository>()),
|
|
|
|
child: const HomePage())),
|
2024-09-17 20:55:24 +04:00
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|