Update: 2026-08-03 11:32:12
This commit is contained in:
@@ -131,6 +131,7 @@ class _AddInvoicePageState extends State<AddInvoicePage> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final cs = Theme.of(context).colorScheme;
|
||||
return Scaffold(
|
||||
backgroundColor: bgColor,
|
||||
appBar: AppBar(
|
||||
@@ -222,7 +223,7 @@ class _AddInvoicePageState extends State<AddInvoicePage> {
|
||||
border: Border.all(
|
||||
color: _imageFile != null
|
||||
? primaryColor
|
||||
: cs.onSurfaceVariant.shade300,
|
||||
: cs.onSurfaceVariant,
|
||||
width: 2,
|
||||
style: _imageFile != null
|
||||
? BorderStyle.solid
|
||||
@@ -356,6 +357,7 @@ class _AddInvoicePageState extends State<AddInvoicePage> {
|
||||
required String hint,
|
||||
bool isNumber = false,
|
||||
}) {
|
||||
final cs = Theme.of(context).colorScheme;
|
||||
return TextFormField(
|
||||
controller: controller,
|
||||
keyboardType: isNumber
|
||||
@@ -379,7 +381,7 @@ class _AddInvoicePageState extends State<AddInvoicePage> {
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
borderSide: BorderSide(color: cs.onSurfaceVariant.shade200),
|
||||
borderSide: BorderSide(color: cs.onSurfaceVariant),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
|
||||
@@ -132,25 +132,15 @@ class _InvoiceListPageState extends State<InvoiceListPage> {
|
||||
|
||||
return Scaffold(
|
||||
backgroundColor: cs.surface,
|
||||
floatingActionButton: Container(
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(colors: [cs.primary, cs.primary.withValues(alpha: 0.7)]),
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: cs.primary.withValues(alpha: 0.3),
|
||||
blurRadius: 12,
|
||||
offset: const Offset(0, 4))
|
||||
],
|
||||
),
|
||||
child: FloatingActionButton.extended(
|
||||
onPressed: () => Get.to(() => AddInvoicePage()),
|
||||
label: const Text('إضافة فاتورة',
|
||||
style: TextStyle(fontWeight: FontWeight.bold)),
|
||||
icon: const Icon(Icons.add_rounded),
|
||||
backgroundColor: Colors.transparent,
|
||||
elevation: 0,
|
||||
),
|
||||
// الإجراء الأساسي هو الموضع الوحيد الذي يستحق لوناً ممتلئاً في الشاشة.
|
||||
floatingActionButton: FloatingActionButton.extended(
|
||||
onPressed: () => Get.to(() => AddInvoicePage()),
|
||||
label: const Text('إضافة فاتورة',
|
||||
style: TextStyle(fontWeight: FontWeight.bold)),
|
||||
icon: const Icon(Icons.add_rounded),
|
||||
backgroundColor: cs.primary,
|
||||
foregroundColor: cs.onPrimary,
|
||||
elevation: 0,
|
||||
),
|
||||
body: Column(
|
||||
children: [
|
||||
@@ -188,23 +178,11 @@ class _InvoiceListPageState extends State<InvoiceListPage> {
|
||||
left: 20,
|
||||
right: 20,
|
||||
),
|
||||
// سطح محايد بحدّ سفلي بدل الشريحة المتدرّجة بلون primary وظلّها —
|
||||
// نفس المبدأ المطبّق في شاشة الرحلات: اللون للمعنى لا للإطار.
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [cs.primary, cs.primary.withValues(alpha: 0.7)],
|
||||
),
|
||||
borderRadius: const BorderRadius.only(
|
||||
bottomLeft: Radius.circular(24),
|
||||
bottomRight: Radius.circular(24),
|
||||
),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: cs.primary.withValues(alpha: 0.2),
|
||||
blurRadius: 20,
|
||||
offset: const Offset(0, 10),
|
||||
),
|
||||
],
|
||||
color: cs.surface,
|
||||
border: Border(bottom: BorderSide(color: cs.outline)),
|
||||
),
|
||||
child: Column(
|
||||
children: [
|
||||
@@ -215,18 +193,19 @@ class _InvoiceListPageState extends State<InvoiceListPage> {
|
||||
child: Container(
|
||||
padding: const EdgeInsets.all(8),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white.withValues(alpha: 0.2),
|
||||
color: cs.surfaceContainerHighest,
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
border: Border.all(color: cs.outline),
|
||||
),
|
||||
child: const Icon(Icons.arrow_back_ios_new_rounded,
|
||||
color: Colors.white, size: 16),
|
||||
child: Icon(Icons.arrow_back_ios_new_rounded,
|
||||
color: cs.onSurfaceVariant, size: 16),
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
const Text(
|
||||
Text(
|
||||
"سجل الفواتير",
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
color: cs.onSurface,
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.w700,
|
||||
),
|
||||
@@ -246,7 +225,7 @@ class _InvoiceListPageState extends State<InvoiceListPage> {
|
||||
isMoney: true,
|
||||
),
|
||||
),
|
||||
Container(width: 1, height: 40, color: Colors.white24),
|
||||
Container(width: 1, height: 40, color: cs.outline),
|
||||
Expanded(
|
||||
child: _buildSummaryItem(
|
||||
title: "عدد الفواتير",
|
||||
@@ -268,29 +247,37 @@ class _InvoiceListPageState extends State<InvoiceListPage> {
|
||||
required IconData icon,
|
||||
required bool isMoney,
|
||||
}) {
|
||||
// بعد تحييد الرأس لم يعد الأبيض مقروءاً. المبلغ يأخذ لون النجاح
|
||||
// والعدّ يأخذ لون النص الأساسي — اللون هنا يحمل معنى لا زينة.
|
||||
final cs = Theme.of(context).colorScheme;
|
||||
final accent = isMoney ? cs.success : cs.primary;
|
||||
|
||||
return Column(
|
||||
children: [
|
||||
Container(
|
||||
padding: const EdgeInsets.all(8),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white.withValues(alpha: 0.2),
|
||||
color: accent.withValues(alpha: 0.12),
|
||||
shape: BoxShape.circle,
|
||||
border: Border.all(color: accent.withValues(alpha: 0.25)),
|
||||
),
|
||||
child: Icon(icon, color: Colors.white, size: 20),
|
||||
child: Icon(icon, color: accent, size: 20),
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
Text(
|
||||
value,
|
||||
style: TextStyle(
|
||||
color: isMoney ? const Color(0xFFD1FAE5) : Colors.white,
|
||||
color: isMoney ? cs.success : cs.onSurface,
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.w800,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
title,
|
||||
style: const TextStyle(
|
||||
color: Colors.white, fontSize: 11, fontWeight: FontWeight.w500),
|
||||
style: TextStyle(
|
||||
color: cs.onSurfaceVariant,
|
||||
fontSize: 11,
|
||||
fontWeight: FontWeight.w500),
|
||||
),
|
||||
],
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user