Sync update: 2026-05-19 23:27:14
This commit is contained in:
@@ -10,28 +10,23 @@ import 'theme/app_theme.dart';
|
||||
|
||||
void main() async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
|
||||
// Initialize Firebase (Requires flutterfire configure)
|
||||
|
||||
// Initialize Firebase
|
||||
try {
|
||||
await Firebase.initializeApp();
|
||||
} catch (e) {
|
||||
print('Firebase initialization error: $e');
|
||||
}
|
||||
|
||||
SystemChrome.setSystemUIOverlayStyle(const SystemUiOverlayStyle(
|
||||
statusBarColor: Colors.transparent,
|
||||
statusBarIconBrightness: Brightness.light,
|
||||
));
|
||||
|
||||
// Register services before app starts
|
||||
Get.put(ContactsService(), permanent: true);
|
||||
Get.put(WhatsAppService(), permanent: true);
|
||||
Get.put(FirebaseService(), permanent: true);
|
||||
|
||||
|
||||
// Initialize Contacts Service
|
||||
await Get.find<ContactsService>().init();
|
||||
Get.find<FirebaseService>().init();
|
||||
|
||||
|
||||
runApp(const WhatsAppApp());
|
||||
}
|
||||
|
||||
@@ -41,9 +36,12 @@ class WhatsAppApp extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return GetMaterialApp(
|
||||
title: 'WhatsApp App',
|
||||
title: 'WhatsApp',
|
||||
debugShowCheckedModeBanner: false,
|
||||
theme: AppTheme.dark,
|
||||
// Follow device theme — no forced dark/light
|
||||
theme: AppTheme.light,
|
||||
darkTheme: AppTheme.dark,
|
||||
themeMode: ThemeMode.system,
|
||||
home: const ConversationsScreen(),
|
||||
defaultTransition: Transition.cupertino,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user