fnotes/lib/main.dart
2024-03-17 14:15:50 +01:00

28 lines
624 B
Dart

import 'package:flutter/material.dart';
import 'package:fnotes/notes.dart';
import 'package:flutter_bloc/flutter_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 BlocProvider(
create: (context) => ThemeBloc(),
child: BlocBuilder<ThemeBloc, ThemeState>(
builder: (context, state) {
return MaterialApp(
theme: state.theme,
home: const Notes(),
);
},
),
);
}
}