35 lines
960 B
Dart
35 lines
960 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter/services.dart';
|
|
import 'package:get/get.dart';
|
|
import 'services/whatsapp_service.dart';
|
|
import 'screens/conversations_screen.dart';
|
|
import 'theme/app_theme.dart';
|
|
|
|
void main() {
|
|
WidgetsFlutterBinding.ensureInitialized();
|
|
SystemChrome.setSystemUIOverlayStyle(const SystemUiOverlayStyle(
|
|
statusBarColor: Colors.transparent,
|
|
statusBarIconBrightness: Brightness.light,
|
|
));
|
|
|
|
// Register the WhatsApp WebSocket client service before app starts
|
|
Get.put(WhatsAppService(), permanent: true);
|
|
|
|
runApp(const WhatsAppApp());
|
|
}
|
|
|
|
class WhatsAppApp extends StatelessWidget {
|
|
const WhatsAppApp({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return GetMaterialApp(
|
|
title: 'WhatsApp App',
|
|
debugShowCheckedModeBanner: false,
|
|
theme: AppTheme.dark,
|
|
home: const ConversationsScreen(),
|
|
defaultTransition: Transition.cupertino,
|
|
);
|
|
}
|
|
}
|