2024-04-30 19:25:16 +02:00
|
|
|
import 'package:cofounderella/services/auth/auth_gate.dart';
|
|
|
|
import 'package:cofounderella/themes/theme_provider.dart';
|
2024-04-29 14:36:25 +02:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:firebase_core/firebase_core.dart';
|
2024-04-30 19:25:16 +02:00
|
|
|
import 'package:provider/provider.dart';
|
2024-04-29 14:36:25 +02:00
|
|
|
import 'firebase_options.dart';
|
|
|
|
|
|
|
|
void main() async {
|
|
|
|
// Firebase stuff
|
|
|
|
WidgetsFlutterBinding.ensureInitialized();
|
|
|
|
await Firebase.initializeApp(
|
|
|
|
options: DefaultFirebaseOptions.currentPlatform,
|
|
|
|
);
|
|
|
|
// Standard stuff
|
2024-04-30 19:25:16 +02:00
|
|
|
runApp(
|
|
|
|
ChangeNotifierProvider(
|
|
|
|
create: (context) => ThemeProvider(),
|
|
|
|
child: const MyApp(),
|
|
|
|
),
|
|
|
|
);
|
2024-04-29 14:36:25 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
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,
|
2024-04-29 17:11:35 +02:00
|
|
|
title: 'Flutter Demo', // TODO change title
|
2024-04-30 19:25:16 +02:00
|
|
|
theme: Provider.of<ThemeProvider>(context).themeData,
|
2024-04-29 14:36:25 +02:00
|
|
|
home: const AuthGate(),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|