Initial commit with Flutter and Node.js code
This commit is contained in:
34
whatsapp_app/lib/main.dart
Normal file
34
whatsapp_app/lib/main.dart
Normal file
@@ -0,0 +1,34 @@
|
||||
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,
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user