add auth, format
This commit is contained in:
@@ -38,17 +38,10 @@ Future<void> _initializeApp() async {
|
||||
|
||||
try {
|
||||
// Initialize core dependencies in parallel for faster startup
|
||||
await Future.wait([
|
||||
_initializeHive(),
|
||||
_initializeSharedPreferences(),
|
||||
]);
|
||||
await Future.wait([_initializeHive(), _initializeSharedPreferences()]);
|
||||
|
||||
// Run the app with Riverpod ProviderScope
|
||||
runApp(
|
||||
const ProviderScope(
|
||||
child: WorkerApp(),
|
||||
),
|
||||
);
|
||||
runApp(const ProviderScope(child: WorkerApp()));
|
||||
} catch (error, stackTrace) {
|
||||
// Critical initialization error - show error screen
|
||||
debugPrint('Failed to initialize app: $error');
|
||||
@@ -192,10 +185,7 @@ Widget _buildErrorApp(Object error, StackTrace stackTrace) {
|
||||
const Text(
|
||||
'Đã xảy ra lỗi khi khởi động ứng dụng. '
|
||||
'Vui lòng thử lại sau hoặc liên hệ hỗ trợ.',
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
color: Color(0xFF6C757D),
|
||||
),
|
||||
style: TextStyle(fontSize: 16, color: Color(0xFF6C757D)),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
const SizedBox(height: 32),
|
||||
|
||||
Reference in New Issue
Block a user