This is my main.dar and I got problems:
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:hive_flutter/adapters.dart';
import 'package:pomodoroTimer/1.app_bar_pomodoro/profile/colors.dart';
import 'apilar_codigo/stacked_all.dart';
void main() async {
// initialize hive
await Hive.initFlutter();
// open a box
await Hive.openBox("Habit_Database");
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
title: 'Flutter Demo',
theme: ThemeData(
textTheme: GoogleFonts.nunitoTextTheme(Theme.of(context).textTheme),
useMaterial3: true,
colorScheme:
ColorScheme.light(primary: ColorsToAPP.selectText)),
home: const StackePages(),
);
}
}
Is there a piece of code that I'm missing out? because I can't run the app
Thanks for any help you can provide
How can I run main.dart without problems?
CodePudding user response:
You are missing the code that will actually run the app:
void main() async {
...
runApp(MyApp());
}