import 'package:ernaehrung/android/pages/nav_pages/main_page.dart'; import 'package:ernaehrung/android/pages/welcome.dart'; import 'package:flutter/material.dart'; import 'package:hive/hive.dart'; import 'models/user.dart'; class AndroidApp extends StatelessWidget { const AndroidApp({super.key}); @override Widget build(BuildContext context) { final box = Hive.box('USER_BOX'); return MaterialApp( title: 'Flutter Demo', theme: ThemeData( scaffoldBackgroundColor: Colors.grey.shade100, //<-- SEE ), home: box.get("USER") == null ? const OnboardingPage() : const MainPage(), routes: { '/navigation': (context) => const MainPage(), }, ); } }