import 'package:app/state/timeStatusState.dart';
import 'package:app/state/mapState.dart';
import 'package:app/view/home.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';

void main() {
  runApp(
    MultiProvider(
      providers: [
        ChangeNotifierProvider<TimeWarningState>(create: (context) => TimeWarningState()),
        ChangeNotifierProvider<MapState>(create: (context) => MapState()),
      ],
      builder: (context, child) => const MyApp(),
    )
  );
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      title: 'Bubatzkarte',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(
            brightness: Brightness.dark,
            seedColor: Colors.green
        ),
        useMaterial3: true,
      ),
      home: const HomeView(),
    );
  }
}