2024-09-23 18:28:49 +04:00
|
|
|
import 'package:flutter/material.dart';
|
2024-11-28 15:46:10 +04:00
|
|
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
|
|
|
import 'package:pmd_lab/presentation/home_page/bloc/bloc.dart';
|
2024-10-25 21:48:27 +04:00
|
|
|
import 'package:pmd_lab/presentation/home_page/home_page.dart';
|
2024-11-28 15:46:10 +04:00
|
|
|
import 'package:pmd_lab/repositories/potter_repository.dart';
|
2024-09-23 18:28:49 +04:00
|
|
|
|
|
|
|
void main() {
|
|
|
|
runApp(const MyApp());
|
|
|
|
}
|
|
|
|
|
|
|
|
class MyApp extends StatelessWidget {
|
|
|
|
const MyApp({super.key});
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return MaterialApp(
|
2024-12-17 14:33:28 +04:00
|
|
|
title: 'Potter App',
|
|
|
|
theme: ThemeData(
|
|
|
|
primarySwatch: Colors.orange,
|
|
|
|
scaffoldBackgroundColor: Colors.white,
|
|
|
|
useMaterial3: true,
|
|
|
|
),
|
|
|
|
home: RepositoryProvider<PotterRepository>(
|
|
|
|
lazy: true,
|
|
|
|
create: (_) => PotterRepository(),
|
|
|
|
child: BlocProvider<HomeBloc>(
|
2024-11-28 15:46:10 +04:00
|
|
|
lazy: true,
|
|
|
|
create: (context) => HomeBloc(context.read<PotterRepository>()),
|
2024-12-17 14:33:28 +04:00
|
|
|
),
|
|
|
|
));
|
2024-09-23 18:28:49 +04:00
|
|
|
}
|
|
|
|
}
|