cofounderella/lib/main.dart

38 lines
964 B
Dart

import '../constants.dart';
import '../services/auth/auth_gate.dart';
import '../themes/theme_provider.dart';
import 'package:flutter/material.dart';
import 'package:firebase_core/firebase_core.dart';
import 'package:provider/provider.dart';
import 'firebase_options.dart';
void main() async {
// Firebase stuff
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp(
options: DefaultFirebaseOptions.currentPlatform,
);
// Standard stuff
runApp(
ChangeNotifierProvider(
create: (context) => ThemeProvider(),
child: const MyApp(),
),
);
}
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: Constants.appTitle,
theme: Provider.of<ThemeProvider>(context).themeData,
home: const AuthGate(),
);
}
}