2024-11-26 01:44:56 +04:00

42 lines
1.3 KiB
Dart

import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:pmd_labs/data/repositories/album_repository.dart';
import 'package:pmd_labs/home_page/home_page.dart';
import 'home_page/bloc/home_bloc.dart';
import 'home_page/home_page.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Лабы ПМУ',
theme: ThemeData(
textTheme: const TextTheme(
headlineLarge: TextStyle(fontFamily: 'Correction_Tape'),
bodyLarge: TextStyle(fontFamily: 'Correction_Tape'),
bodyMedium: TextStyle(fontFamily: 'Correction_Tape'),
headlineSmall: TextStyle(fontFamily: 'Correction_Tape'),
),
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
useMaterial3: true,
),
home: RepositoryProvider<AlbumRepository>(
lazy: true,
create: (_) => AlbumRepository(),
child: BlocProvider<HomeBloc>(
lazy: false,
create: (context) => HomeBloc(context.read<AlbumRepository>()),
child: const MyHomePage(title: 'Catalog of Music Albums'),
),
)
);
}
}