import 'package:flutter/material.dart'; import 'package:todo/pages/home_page.dart'; import 'package:hive_flutter/hive_flutter.dart'; void main() async { //init hive await Hive.initFlutter(); //open the box var box = await Hive.openBox('todoBox'); runApp(const MyApp()); } class MyApp extends StatefulWidget { const MyApp({Key? key}) : super(key: key); @override State createState() => _MyAppState(); } class _MyAppState extends State { // This widget is the root of your application. @override Widget build(BuildContext context) { return MaterialApp( title: 'Todo', theme: ThemeData( primarySwatch: Colors.red, ), home: const MyHomePage(title: 'Ma liste de tache'), ); } }