28 lines
830 B
Dart
28 lines
830 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
|
import 'package:pmu/data/repositories/api_user_repository.dart';
|
|
import 'package:pmu/presentation/home_page/bloc/bloc.dart';
|
|
import 'package:pmu/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: 'LoveSearch',
|
|
home: RepositoryProvider<ApiUserRepository>(
|
|
lazy: true,
|
|
create: (_) => ApiUserRepository(),
|
|
child: BlocProvider<HomeBlock>(
|
|
lazy: false,
|
|
create: (context) => HomeBlock(context.read<ApiUserRepository>()),
|
|
child: const MyHomePage(title: "LoveSearch"))),
|
|
);
|
|
}
|
|
}
|