Files
musadaq-saas/musadaq-app/lib/features/dashboard/views/dashboard_view.dart
2026-05-06 02:59:43 +03:00

58 lines
1.7 KiB
Dart

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('المسح الضوئي (المرحلة 2)'),
onPressed: () {
Get.snackbar(
'قريباً', 'سيتم برمجة هذه الميزة في المرحلة الثانية');
},
)
],
),
),
);
}
}