Vaibhav Surve 6a36064af7 feat: Implement project management features across controllers and views
- Added DashboardController and ProjectController for managing project data.
- Enhanced LayoutController to support project selection and loading states.
- Created UserProfileBar for user-specific actions and information.
- Refactored app initialization logic to streamline setup and error handling.
- Updated layout views to integrate project selection and improve user experience.
2025-06-11 17:11:50 +05:30

32 lines
828 B
Dart

import 'package:flutter/material.dart';
import 'package:marco/helpers/services/app_initializer.dart';
import 'package:marco/view/my_app.dart';
import 'package:provider/provider.dart';
import 'package:marco/helpers/theme/app_notifier.dart';
import 'package:logger/logger.dart';
final Logger logger = Logger();
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
try {
await initializeApp();
runApp(
ChangeNotifierProvider<AppNotifier>(
create: (_) => AppNotifier(),
child: const MyApp(),
),
);
} catch (e, stacktrace) {
logger.e('App failed to initialize:', error: e, stackTrace: stacktrace);
runApp(
const MaterialApp(
home: Scaffold(
body: Center(child: Text("Failed to initialize the app.")),
),
),
);
}
}