fnotes/lib/main.dart

28 lines
624 B
Dart
Raw Normal View History

2024-03-17 13:15:50 +00:00
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(),
);
},
),
);
}
}