Update: 2026-05-07 18:41:16
This commit is contained in:
@@ -4,8 +4,8 @@ import '../../features/auth/views/phone_input_view.dart';
|
|||||||
import '../../features/auth/views/otp_verify_view.dart';
|
import '../../features/auth/views/otp_verify_view.dart';
|
||||||
import '../../features/auth/views/biometric_setup_view.dart';
|
import '../../features/auth/views/biometric_setup_view.dart';
|
||||||
import '../../features/auth/views/biometric_auth_view.dart';
|
import '../../features/auth/views/biometric_auth_view.dart';
|
||||||
|
import '../../features/main_shell/controllers/main_shell_controller.dart';
|
||||||
import '../../features/main_shell/views/main_shell_view.dart';
|
import '../../features/main_shell/views/main_shell_view.dart';
|
||||||
import '../../features/dashboard/views/dashboard_view.dart';
|
|
||||||
import '../../features/dashboard/controllers/dashboard_controller.dart';
|
import '../../features/dashboard/controllers/dashboard_controller.dart';
|
||||||
import '../../features/scanner/views/scanner_view.dart';
|
import '../../features/scanner/views/scanner_view.dart';
|
||||||
import '../../features/scanner/controllers/scanner_controller.dart';
|
import '../../features/scanner/controllers/scanner_controller.dart';
|
||||||
@@ -21,6 +21,7 @@ import '../../core/storage/secure_storage.dart';
|
|||||||
part 'app_routes.dart';
|
part 'app_routes.dart';
|
||||||
|
|
||||||
class AppPages {
|
class AppPages {
|
||||||
|
// ignore: constant_identifier_names
|
||||||
static const INITIAL = AppRoutes.SPLASH;
|
static const INITIAL = AppRoutes.SPLASH;
|
||||||
|
|
||||||
static final routes = [
|
static final routes = [
|
||||||
@@ -87,6 +88,7 @@ class AppPages {
|
|||||||
name: AppRoutes.MAIN,
|
name: AppRoutes.MAIN,
|
||||||
page: () => const MainShellView(),
|
page: () => const MainShellView(),
|
||||||
binding: BindingsBuilder(() {
|
binding: BindingsBuilder(() {
|
||||||
|
Get.put(MainShellController());
|
||||||
Get.put(DashboardController());
|
Get.put(DashboardController());
|
||||||
Get.put(InvoicesController());
|
Get.put(InvoicesController());
|
||||||
Get.put(SettingsController());
|
Get.put(SettingsController());
|
||||||
@@ -97,6 +99,7 @@ class AppPages {
|
|||||||
name: AppRoutes.DASHBOARD,
|
name: AppRoutes.DASHBOARD,
|
||||||
page: () => const MainShellView(), // Now redirects to MainShell
|
page: () => const MainShellView(), // Now redirects to MainShell
|
||||||
binding: BindingsBuilder(() {
|
binding: BindingsBuilder(() {
|
||||||
|
Get.put(MainShellController());
|
||||||
Get.put(DashboardController());
|
Get.put(DashboardController());
|
||||||
Get.put(InvoicesController());
|
Get.put(InvoicesController());
|
||||||
Get.put(SettingsController());
|
Get.put(SettingsController());
|
||||||
|
|||||||
@@ -13,6 +13,8 @@ import '../../../core/services/voice_assistant_service.dart';
|
|||||||
import '../../../core/utils/app_snackbar.dart';
|
import '../../../core/utils/app_snackbar.dart';
|
||||||
import '../../../core/utils/logger.dart';
|
import '../../../core/utils/logger.dart';
|
||||||
import '../../../app/routes/app_pages.dart';
|
import '../../../app/routes/app_pages.dart';
|
||||||
|
import '../../invoices/controllers/invoices_controller.dart';
|
||||||
|
import '../../main_shell/controllers/main_shell_controller.dart';
|
||||||
|
|
||||||
class DashboardController extends GetxController {
|
class DashboardController extends GetxController {
|
||||||
final SecureStorage _storage = SecureStorage();
|
final SecureStorage _storage = SecureStorage();
|
||||||
@@ -339,9 +341,7 @@ class DashboardController extends GetxController {
|
|||||||
);
|
);
|
||||||
|
|
||||||
final action = (intent['action'] ?? '').toString();
|
final action = (intent['action'] ?? '').toString();
|
||||||
final params = Map<String, dynamic>.from(
|
final params = _asStringMap(intent['params']);
|
||||||
(intent['params'] as Map?) ?? <String, dynamic>{},
|
|
||||||
);
|
|
||||||
final confirmation = (intent['confirmation'] ??
|
final confirmation = (intent['confirmation'] ??
|
||||||
execution['message'] ??
|
execution['message'] ??
|
||||||
'تم تنفيذ الأمر الصوتي')
|
'تم تنفيذ الأمر الصوتي')
|
||||||
@@ -356,7 +356,7 @@ class DashboardController extends GetxController {
|
|||||||
(execution['message'] ?? 'تعذر تنفيذ الأمر داخليًا').toString(),
|
(execution['message'] ?? 'تعذر تنفيذ الأمر داخليًا').toString(),
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
_executeAction(action, params);
|
_executeAction(action, params, execution);
|
||||||
}
|
}
|
||||||
} on DioException catch (e) {
|
} on DioException catch (e) {
|
||||||
AppLogger.error('Voice upload error', e.response?.data ?? e.message);
|
AppLogger.error('Voice upload error', e.response?.data ?? e.message);
|
||||||
@@ -381,20 +381,28 @@ class DashboardController extends GetxController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void _executeAction(String action, dynamic params) {
|
Map<String, dynamic> _asStringMap(dynamic value) {
|
||||||
|
if (value is Map) {
|
||||||
|
return Map<String, dynamic>.from(value);
|
||||||
|
}
|
||||||
|
return <String, dynamic>{};
|
||||||
|
}
|
||||||
|
|
||||||
|
void _executeAction(
|
||||||
|
String action,
|
||||||
|
Map<String, dynamic> params,
|
||||||
|
Map<String, dynamic> execution,
|
||||||
|
) {
|
||||||
switch (action) {
|
switch (action) {
|
||||||
case 'list_invoices':
|
case 'list_invoices':
|
||||||
case 'search_invoice':
|
case 'search_invoice':
|
||||||
Get.toNamed(AppRoutes.MAIN);
|
_openInvoicesFromVoice(params, execution);
|
||||||
AppSnackbar.showWarning(
|
|
||||||
'معلومة', 'تم فتح الواجهة الرئيسية؛ عرض نتائج تفصيلي قادم');
|
|
||||||
break;
|
break;
|
||||||
case 'open_scanner':
|
case 'open_scanner':
|
||||||
Get.toNamed(AppRoutes.SCANNER);
|
Get.toNamed(AppRoutes.SCANNER);
|
||||||
break;
|
break;
|
||||||
case 'navigate':
|
case 'navigate':
|
||||||
final screen =
|
final screen = params['screen']?.toString().toLowerCase();
|
||||||
(params is Map ? params['screen'] : null)?.toString().toLowerCase();
|
|
||||||
if (screen == 'settings') {
|
if (screen == 'settings') {
|
||||||
Get.toNamed(AppRoutes.MAIN);
|
Get.toNamed(AppRoutes.MAIN);
|
||||||
} else if (screen == 'scanner') {
|
} else if (screen == 'scanner') {
|
||||||
@@ -418,6 +426,35 @@ class DashboardController extends GetxController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void _openInvoicesFromVoice(
|
||||||
|
Map<String, dynamic> params,
|
||||||
|
Map<String, dynamic> execution,
|
||||||
|
) {
|
||||||
|
final invoicesController = Get.isRegistered<InvoicesController>()
|
||||||
|
? Get.find<InvoicesController>()
|
||||||
|
: Get.put(InvoicesController());
|
||||||
|
|
||||||
|
invoicesController.applyVoiceFilters(params);
|
||||||
|
|
||||||
|
if (Get.isRegistered<MainShellController>()) {
|
||||||
|
Get.find<MainShellController>().selectTab(1);
|
||||||
|
} else {
|
||||||
|
Get.offAllNamed(AppRoutes.MAIN);
|
||||||
|
}
|
||||||
|
|
||||||
|
final data = execution['data'];
|
||||||
|
final count = data is Map ? data['count'] : null;
|
||||||
|
final status = params['status']?.toString();
|
||||||
|
final suffix = count == null ? '' : ' ($count)';
|
||||||
|
final label = status == 'approved'
|
||||||
|
? 'المعتمدة'
|
||||||
|
: status == 'extracted'
|
||||||
|
? 'الجاهزة'
|
||||||
|
: 'المطابقة';
|
||||||
|
|
||||||
|
AppSnackbar.showSuccess('الفواتير', 'تم عرض الفواتير $label$suffix');
|
||||||
|
}
|
||||||
|
|
||||||
void _resetVoiceState() {
|
void _resetVoiceState() {
|
||||||
_recordTimer?.cancel();
|
_recordTimer?.cancel();
|
||||||
isVoiceRecording.value = false;
|
isVoiceRecording.value = false;
|
||||||
|
|||||||
@@ -26,14 +26,24 @@ class InvoicesController extends GetxController {
|
|||||||
final q = searchQuery.value.toLowerCase();
|
final q = searchQuery.value.toLowerCase();
|
||||||
list = list.where((inv) {
|
list = list.where((inv) {
|
||||||
final name = (inv['supplier_name'] ?? '').toString().toLowerCase();
|
final name = (inv['supplier_name'] ?? '').toString().toLowerCase();
|
||||||
|
final company = (inv['company_name'] ?? '').toString().toLowerCase();
|
||||||
final num = (inv['invoice_number'] ?? '').toString().toLowerCase();
|
final num = (inv['invoice_number'] ?? '').toString().toLowerCase();
|
||||||
return name.contains(q) || num.contains(q);
|
return name.contains(q) || company.contains(q) || num.contains(q);
|
||||||
}).toList();
|
}).toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void applyVoiceFilters(Map<String, dynamic> params) {
|
||||||
|
filterStatus.value = _normalizeStatus(params['status']);
|
||||||
|
|
||||||
|
final query =
|
||||||
|
(params['number'] ?? params['company'] ?? '').toString().trim();
|
||||||
|
searchQuery.value = query;
|
||||||
|
isSearching.value = query.isNotEmpty;
|
||||||
|
}
|
||||||
|
|
||||||
void toggleSearch() {
|
void toggleSearch() {
|
||||||
isSearching.value = !isSearching.value;
|
isSearching.value = !isSearching.value;
|
||||||
if (!isSearching.value) searchQuery.value = '';
|
if (!isSearching.value) searchQuery.value = '';
|
||||||
@@ -52,4 +62,19 @@ class InvoicesController extends GetxController {
|
|||||||
isLoading.value = false;
|
isLoading.value = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String _normalizeStatus(dynamic status) {
|
||||||
|
final value = status?.toString().toLowerCase().trim() ?? '';
|
||||||
|
const supported = {
|
||||||
|
'all',
|
||||||
|
'approved',
|
||||||
|
'extracted',
|
||||||
|
'uploaded',
|
||||||
|
'processing',
|
||||||
|
'pending',
|
||||||
|
'rejected',
|
||||||
|
};
|
||||||
|
|
||||||
|
return supported.contains(value) ? value : 'all';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
|
class MainShellController extends GetxController {
|
||||||
|
final currentIndex = 0.obs;
|
||||||
|
|
||||||
|
void selectTab(int index) {
|
||||||
|
currentIndex.value = index;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -4,9 +4,9 @@ import '../../dashboard/views/dashboard_view.dart';
|
|||||||
import '../../invoices/views/invoices_list_view.dart';
|
import '../../invoices/views/invoices_list_view.dart';
|
||||||
import '../../notifications/views/notifications_view.dart';
|
import '../../notifications/views/notifications_view.dart';
|
||||||
import '../../settings/views/settings_view.dart';
|
import '../../settings/views/settings_view.dart';
|
||||||
|
import '../controllers/main_shell_controller.dart';
|
||||||
import '../../../app/routes/app_pages.dart';
|
import '../../../app/routes/app_pages.dart';
|
||||||
import '../../../core/services/upload_progress_service.dart';
|
import '../../../core/services/upload_progress_service.dart';
|
||||||
import '../../../core/utils/app_snackbar.dart';
|
|
||||||
|
|
||||||
class MainShellView extends StatefulWidget {
|
class MainShellView extends StatefulWidget {
|
||||||
const MainShellView({super.key});
|
const MainShellView({super.key});
|
||||||
@@ -16,37 +16,41 @@ class MainShellView extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _MainShellViewState extends State<MainShellView> {
|
class _MainShellViewState extends State<MainShellView> {
|
||||||
int _currentIndex = 0;
|
final MainShellController _shellController = Get.find<MainShellController>();
|
||||||
final UploadProgressService _progressService = Get.put(UploadProgressService());
|
final UploadProgressService _progressService =
|
||||||
|
Get.put(UploadProgressService());
|
||||||
|
|
||||||
// 5 pages: Home(0), Invoices(1), [Scanner FAB](2), Notifications(3), Settings(4)
|
// 5 pages: Home(0), Invoices(1), [Scanner FAB](2), Notifications(3), Settings(4)
|
||||||
final List<Widget> _pages = const [
|
final List<Widget> _pages = const [
|
||||||
DashboardView(), // 0
|
DashboardView(), // 0
|
||||||
InvoicesListView(), // 1
|
InvoicesListView(), // 1
|
||||||
SizedBox(), // 2 - Scanner (FAB placeholder)
|
SizedBox(), // 2 - Scanner (FAB placeholder)
|
||||||
NotificationsView(), // 3
|
NotificationsView(), // 3
|
||||||
SettingsView(), // 4
|
SettingsView(), // 4
|
||||||
];
|
];
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final isDark = Theme.of(context).brightness == Brightness.dark;
|
final isDark = Theme.of(context).brightness == Brightness.dark;
|
||||||
final navBg = isDark ? const Color(0xFF1A1A2E) : Colors.white;
|
final navBg = isDark ? const Color(0xFF1A1A2E) : Colors.white;
|
||||||
final activeColor = const Color(0xFF0F4C81);
|
const activeColor = Color(0xFF0F4C81);
|
||||||
final inactiveColor = isDark ? Colors.white38 : const Color(0xFF94A3B8);
|
final inactiveColor = isDark ? Colors.white38 : const Color(0xFF94A3B8);
|
||||||
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: isDark ? const Color(0xFF121212) : const Color(0xFFF5F7FA),
|
backgroundColor:
|
||||||
|
isDark ? const Color(0xFF121212) : const Color(0xFFF5F7FA),
|
||||||
body: Stack(
|
body: Stack(
|
||||||
children: [
|
children: [
|
||||||
IndexedStack(
|
Obx(
|
||||||
index: _getPageIndex(_currentIndex),
|
() => IndexedStack(
|
||||||
children: [
|
index: _getPageIndex(_shellController.currentIndex.value),
|
||||||
_pages[0], // Dashboard
|
children: [
|
||||||
_pages[1], // Invoices
|
_pages[0], // Dashboard
|
||||||
_pages[3], // Notifications
|
_pages[1], // Invoices
|
||||||
_pages[4], // Settings
|
_pages[3], // Notifications
|
||||||
],
|
_pages[4], // Settings
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
// Global Upload Progress Overlay
|
// Global Upload Progress Overlay
|
||||||
@@ -73,13 +77,17 @@ class _MainShellViewState extends State<MainShellView> {
|
|||||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
children: [
|
children: [
|
||||||
// Left side (2 items)
|
// Left side (2 items)
|
||||||
_buildNavItem(0, Icons.home_rounded, 'الرئيسية', activeColor, inactiveColor),
|
_buildNavItem(0, Icons.home_rounded, 'الرئيسية', activeColor,
|
||||||
_buildNavItem(1, Icons.receipt_long_rounded, 'الفواتير', activeColor, inactiveColor),
|
inactiveColor),
|
||||||
|
_buildNavItem(1, Icons.receipt_long_rounded, 'الفواتير',
|
||||||
|
activeColor, inactiveColor),
|
||||||
// Center gap for FAB
|
// Center gap for FAB
|
||||||
const SizedBox(width: 48),
|
const SizedBox(width: 48),
|
||||||
// Right side (2 items)
|
// Right side (2 items)
|
||||||
_buildNavItem(3, Icons.notifications_rounded, 'الإشعارات', activeColor, inactiveColor),
|
_buildNavItem(3, Icons.notifications_rounded, 'الإشعارات',
|
||||||
_buildNavItem(4, Icons.settings_rounded, 'الإعدادات', activeColor, inactiveColor),
|
activeColor, inactiveColor),
|
||||||
|
_buildNavItem(4, Icons.settings_rounded, 'الإعدادات', activeColor,
|
||||||
|
inactiveColor),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -95,37 +103,45 @@ class _MainShellViewState extends State<MainShellView> {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildNavItem(int index, IconData icon, String label, Color active, Color inactive) {
|
Widget _buildNavItem(
|
||||||
final isSelected = _currentIndex == index;
|
int index, IconData icon, String label, Color active, Color inactive) {
|
||||||
return Expanded(
|
return Expanded(
|
||||||
child: InkWell(
|
child: Obx(() {
|
||||||
onTap: () => setState(() => _currentIndex = index),
|
final isSelected = _shellController.currentIndex.value == index;
|
||||||
borderRadius: BorderRadius.circular(12),
|
|
||||||
child: Column(
|
return InkWell(
|
||||||
mainAxisSize: MainAxisSize.min,
|
onTap: () => _shellController.selectTab(index),
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
borderRadius: BorderRadius.circular(12),
|
||||||
children: [
|
child: Column(
|
||||||
AnimatedContainer(
|
mainAxisSize: MainAxisSize.min,
|
||||||
duration: const Duration(milliseconds: 200),
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 2),
|
children: [
|
||||||
decoration: isSelected ? BoxDecoration(
|
AnimatedContainer(
|
||||||
color: active.withOpacity(0.1),
|
duration: const Duration(milliseconds: 200),
|
||||||
borderRadius: BorderRadius.circular(16),
|
padding:
|
||||||
) : null,
|
const EdgeInsets.symmetric(horizontal: 12, vertical: 2),
|
||||||
child: Icon(icon, color: isSelected ? active : inactive, size: 22),
|
decoration: isSelected
|
||||||
),
|
? BoxDecoration(
|
||||||
const SizedBox(height: 2),
|
color: active.withValues(alpha: 0.1),
|
||||||
Text(
|
borderRadius: BorderRadius.circular(16),
|
||||||
label,
|
)
|
||||||
style: TextStyle(
|
: null,
|
||||||
fontSize: 10,
|
child:
|
||||||
fontWeight: isSelected ? FontWeight.w700 : FontWeight.w400,
|
Icon(icon, color: isSelected ? active : inactive, size: 22),
|
||||||
color: isSelected ? active : inactive,
|
|
||||||
),
|
),
|
||||||
),
|
const SizedBox(height: 2),
|
||||||
],
|
Text(
|
||||||
),
|
label,
|
||||||
),
|
style: TextStyle(
|
||||||
|
fontSize: 10,
|
||||||
|
fontWeight: isSelected ? FontWeight.w700 : FontWeight.w400,
|
||||||
|
color: isSelected ? active : inactive,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -142,7 +158,7 @@ class _MainShellViewState extends State<MainShellView> {
|
|||||||
),
|
),
|
||||||
boxShadow: [
|
boxShadow: [
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
color: const Color(0xFFD4AF37).withOpacity(0.4),
|
color: const Color(0xFFD4AF37).withValues(alpha: 0.4),
|
||||||
blurRadius: 12,
|
blurRadius: 12,
|
||||||
offset: const Offset(0, 4),
|
offset: const Offset(0, 4),
|
||||||
),
|
),
|
||||||
@@ -153,7 +169,8 @@ class _MainShellViewState extends State<MainShellView> {
|
|||||||
backgroundColor: Colors.transparent,
|
backgroundColor: Colors.transparent,
|
||||||
elevation: 0,
|
elevation: 0,
|
||||||
heroTag: 'scanner_fab',
|
heroTag: 'scanner_fab',
|
||||||
child: const Icon(Icons.document_scanner_rounded, color: Colors.white, size: 26),
|
child: const Icon(Icons.document_scanner_rounded,
|
||||||
|
color: Colors.white, size: 26),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -162,10 +179,13 @@ class _MainShellViewState extends State<MainShellView> {
|
|||||||
final status = _progressService.status.value;
|
final status = _progressService.status.value;
|
||||||
final progress = _progressService.progress.value;
|
final progress = _progressService.progress.value;
|
||||||
|
|
||||||
Color accentColor = status == 'done' ? const Color(0xFF10B981) : const Color(0xFF0F4C81);
|
Color accentColor =
|
||||||
|
status == 'done' ? const Color(0xFF10B981) : const Color(0xFF0F4C81);
|
||||||
String statusText = status == 'uploading'
|
String statusText = status == 'uploading'
|
||||||
? 'جاري رفع الصور...'
|
? 'جاري رفع الصور...'
|
||||||
: (status == 'processing' ? 'جاري استخراج البيانات...' : 'اكتملت المعالجة ✓');
|
: (status == 'processing'
|
||||||
|
? 'جاري استخراج البيانات...'
|
||||||
|
: 'اكتملت المعالجة ✓');
|
||||||
|
|
||||||
return Card(
|
return Card(
|
||||||
elevation: 8,
|
elevation: 8,
|
||||||
@@ -180,24 +200,36 @@ class _MainShellViewState extends State<MainShellView> {
|
|||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
status == 'done'
|
status == 'done'
|
||||||
? const Icon(Icons.check_circle, color: Color(0xFF10B981), size: 24)
|
? const Icon(Icons.check_circle,
|
||||||
: const SizedBox(width: 24, height: 24, child: CircularProgressIndicator(strokeWidth: 2, color: Color(0xFF0F4C81))),
|
color: Color(0xFF10B981), size: 24)
|
||||||
|
: const SizedBox(
|
||||||
|
width: 24,
|
||||||
|
height: 24,
|
||||||
|
child: CircularProgressIndicator(
|
||||||
|
strokeWidth: 2, color: Color(0xFF0F4C81))),
|
||||||
const SizedBox(width: 12),
|
const SizedBox(width: 12),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text(statusText, style: const TextStyle(fontWeight: FontWeight.bold, fontSize: 13)),
|
Text(statusText,
|
||||||
|
style: const TextStyle(
|
||||||
|
fontWeight: FontWeight.bold, fontSize: 13)),
|
||||||
Text(
|
Text(
|
||||||
'${_progressService.companyName.value} • ${_progressService.currentImageIndex.value}/${_progressService.totalImages.value}',
|
'${_progressService.companyName.value} • ${_progressService.currentImageIndex.value}/${_progressService.totalImages.value}',
|
||||||
style: TextStyle(fontSize: 11, color: isDark ? Colors.white38 : Colors.grey),
|
style: TextStyle(
|
||||||
|
fontSize: 11,
|
||||||
|
color: isDark ? Colors.white38 : Colors.grey),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
'${(progress * 100).toInt()}%',
|
'${(progress * 100).toInt()}%',
|
||||||
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 14, color: accentColor),
|
style: TextStyle(
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: 14,
|
||||||
|
color: accentColor),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@@ -206,7 +238,8 @@ class _MainShellViewState extends State<MainShellView> {
|
|||||||
borderRadius: BorderRadius.circular(4),
|
borderRadius: BorderRadius.circular(4),
|
||||||
child: LinearProgressIndicator(
|
child: LinearProgressIndicator(
|
||||||
value: progress,
|
value: progress,
|
||||||
backgroundColor: isDark ? Colors.white10 : const Color(0xFFE2E8F0),
|
backgroundColor:
|
||||||
|
isDark ? Colors.white10 : const Color(0xFFE2E8F0),
|
||||||
color: accentColor,
|
color: accentColor,
|
||||||
minHeight: 6,
|
minHeight: 6,
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user