39 lines
990 B
Dart
39 lines
990 B
Dart
import 'package:baligh/constants/theme.dart';
|
|
import 'package:baligh/screens/home_screen.dart';
|
|
import 'package:baligh/screens/login_screen.dart';
|
|
import 'package:bot_toast/bot_toast.dart';
|
|
import 'package:firebase_auth/firebase_auth.dart';
|
|
import 'package:firebase_core/firebase_core.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'firebase_options.dart';
|
|
|
|
void main() async {
|
|
WidgetsFlutterBinding.ensureInitialized();
|
|
|
|
await Firebase.initializeApp(
|
|
options: DefaultFirebaseOptions.currentPlatform,
|
|
);
|
|
|
|
|
|
runApp(const MainApp());
|
|
}
|
|
|
|
class MainApp extends StatelessWidget {
|
|
const MainApp({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return MaterialApp(
|
|
title: 'بلغ',
|
|
debugShowCheckedModeBanner: false,
|
|
theme: MyCustomTheme.theme,
|
|
locale: const Locale("ar"),
|
|
builder: BotToastInit(),
|
|
home: FirebaseAuth.instance.currentUser == null
|
|
? const LoginScreen()
|
|
: const HomeScreen(),
|
|
);
|
|
}
|
|
}
|