المجلدات وأسماء حزم dart واستيراداتها: siro_rider → intaleq_rider siro_driver → intaleq_driver siro_admin → intaleq_admin siro_service → intaleq_service شمل ذلك `name:` في كل pubspec وكل `package:siro_*` في الاستيرادات (115 ملفاً في rider وحده)، وإشارات أسماء المجلدات في docs/ وتعليق في backend/Admin/notifications/broadcast.php. لم تبقَ إشارة واحدة (تحقّقت). + ضُمّت حزم get و get_storage داخل intaleq_driver/packages/ وحُوّلت مساراتها الثلاثة من `../../Intaleq/packages/*` إلى `./packages/*`. كانت تُحل عرضاً إلى مجلد App/Intaleq القديم المجاور — تبعية خارج المستودع تنكسر بأول نقل. لم يبقَ في أي تطبيق تبعية مسار خارج الشجرة. ⚠️ لم تُمسّ بعد: هويات المتاجر (applicationId · PRODUCT_BUNDLE_IDENTIFIER · shorebird app_id) ولا الألوان ولا النصوص المرئية ولا النطاقات — كل منها كوميت منفصل، والهويات تحتاج قرار المالك. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
95 lines
3.0 KiB
Dart
95 lines
3.0 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:get/get.dart'; // For Get.width if needed, and .tr
|
|
import 'package:intaleq_admin/constant/colors.dart'; // Assuming AppColor is here
|
|
import 'package:intaleq_admin/constant/style.dart'; // Assuming AppStyle is here
|
|
|
|
class DashboardStatCard extends StatelessWidget {
|
|
final String title;
|
|
final String value;
|
|
final IconData? icon;
|
|
final Color? iconColor;
|
|
final Color? backgroundColor;
|
|
final Color? valueColor;
|
|
|
|
const DashboardStatCard({
|
|
super.key,
|
|
required this.title,
|
|
required this.value,
|
|
this.icon,
|
|
this.iconColor,
|
|
this.backgroundColor,
|
|
this.valueColor,
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
// Attempt to use AppStyle.boxDecoration1 properties if it's a BoxDecoration
|
|
BoxDecoration? baseDecoration = AppStyle.boxDecoration1;
|
|
Color? finalBackgroundColor =
|
|
backgroundColor ?? baseDecoration.color ?? Theme.of(context).cardColor;
|
|
BorderRadius? finalBorderRadius =
|
|
baseDecoration.borderRadius?.resolve(Directionality.of(context)) ??
|
|
BorderRadius.circular(12.0);
|
|
|
|
return Container(
|
|
padding: const EdgeInsets.symmetric(horizontal: 14.0, vertical: 12.0),
|
|
decoration: BoxDecoration(
|
|
color: finalBackgroundColor,
|
|
borderRadius: finalBorderRadius,
|
|
boxShadow: [
|
|
BoxShadow(
|
|
color: Colors.grey.withOpacity(0.1),
|
|
spreadRadius: 1,
|
|
blurRadius: 6,
|
|
offset: const Offset(0, 2),
|
|
),
|
|
],
|
|
// If AppStyle.boxDecoration1 includes a border, you might want to add it here too
|
|
// border: baseDecoration?.border,
|
|
),
|
|
child: Column(
|
|
mainAxisAlignment:
|
|
MainAxisAlignment.center, // Center content vertically
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Row(
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Flexible(
|
|
child: Text(
|
|
title.tr,
|
|
style: AppStyle.title.copyWith(
|
|
fontSize: 13,
|
|
fontWeight: FontWeight.w500,
|
|
color: Theme.of(context).textTheme.bodySmall?.color,
|
|
),
|
|
maxLines: 2,
|
|
overflow: TextOverflow.ellipsis,
|
|
),
|
|
),
|
|
if (icon != null)
|
|
Icon(
|
|
icon,
|
|
size: 24,
|
|
color: iconColor ?? AppColor.primaryColor.withOpacity(0.7),
|
|
),
|
|
],
|
|
),
|
|
const SizedBox(height: 6),
|
|
Text(
|
|
value,
|
|
style: TextStyle(
|
|
fontSize: 22,
|
|
fontWeight: FontWeight.bold,
|
|
color: valueColor ?? AppColor.primaryColor,
|
|
),
|
|
maxLines: 1,
|
|
overflow: TextOverflow.ellipsis,
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|