import 'package:flutter/material.dart'; import 'package:get/get.dart'; import '../../../app/routes/app_pages.dart'; import '../../../core/storage/secure_storage.dart'; class DashboardView extends StatelessWidget { DashboardView({super.key}); final SecureStorage _storage = SecureStorage(); void _logout() async { await _storage.clearAll(); Get.offAllNamed(AppRoutes.PHONE_INPUT); } @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: const Text('لوحة التحكم - مُصادَق'), actions: [ IconButton( icon: const Icon(Icons.logout), onPressed: _logout, ) ], ), body: Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ const Icon(Icons.check_circle, size: 80, color: Colors.green), const SizedBox(height: 24), const Text( 'أهلاً بك في مُصادَق!', style: TextStyle(fontSize: 24, fontWeight: FontWeight.bold), ), const SizedBox(height: 16), const Text( 'تم تسجيل الدخول بنجاح وتفعيل الـ HMAC.', style: TextStyle(color: Colors.grey), ), const SizedBox(height: 48), ElevatedButton.icon( icon: const Icon(Icons.document_scanner), label: const Text('مسح فاتورة جديدة'), style: ElevatedButton.styleFrom( backgroundColor: const Color(0xFF0F4C81), foregroundColor: Colors.white, padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 12), ), onPressed: () => Get.toNamed(AppRoutes.SCANNER), ) ], ), ), ); } }