import 'package:flutter/material.dart'; import 'package:fnotes/notes.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:fnotes/persistence_bloc.dart'; import 'package:fnotes/theme_bloc.dart'; void main() { runApp(const MainApp()); } class MainApp extends StatelessWidget { const MainApp({super.key}); @override Widget build(BuildContext context) { return MultiBlocProvider( providers: [ BlocProvider(create: (context) => ThemeBloc()), BlocProvider(create: (context) => PersistenceBloc()) ], child: BlocBuilder( builder: (context, state) { return MaterialApp( theme: state.theme, home: const Notes(), ); }, ), ); } }