إصلاح أخطاء شاشة الكباتن من تحديث الذكاء الاصطناعي

This commit is contained in:
Hamza-Ayed
2026-07-26 12:18:23 +03:00
parent 16feb51a75
commit 4b5235c35c
16 changed files with 72976 additions and 72556 deletions
+60 -67
View File
@@ -17,8 +17,62 @@ class PackageUpdateScreen extends StatelessWidget {
final cs = Theme.of(context).colorScheme;
return Scaffold(
backgroundColor: cs.surface,
appBar: _buildAppBar(cs),
body: GetBuilder<PackageController>(
body: Column(
children: [
Container(
padding: const EdgeInsets.fromLTRB(16, 50, 16, 16),
child: Row(
children: [
GestureDetector(
onTap: () => Get.back(),
child: Container(
padding: const EdgeInsets.all(8),
decoration: BoxDecoration(
color: cs.surfaceContainerHighest,
borderRadius: BorderRadius.circular(10),
border: Border.all(color: cs.outline),
),
child: Icon(Icons.arrow_back_ios_new_rounded,
color: cs.onSurfaceVariant, size: 16),
),
),
const SizedBox(width: 12),
Container(
padding: const EdgeInsets.all(8),
decoration: BoxDecoration(
color: cs.primary.withValues(alpha: 0.12),
borderRadius: BorderRadius.circular(10),
border: Border.all(color: cs.primary.withValues(alpha: 0.25)),
),
child: Icon(Icons.system_update_rounded,
color: cs.primary, size: 16),
),
const SizedBox(width: 10),
Text('تحديث التطبيق',
style: TextStyle(
color: cs.onSurface,
fontSize: 17,
fontWeight: FontWeight.bold)),
const Spacer(),
GestureDetector(
onTap: () => packageController.fetchPackages(),
child: Container(
padding: const EdgeInsets.all(8),
decoration: BoxDecoration(
color: cs.surfaceContainerHighest,
borderRadius: BorderRadius.circular(10),
border: Border.all(color: cs.outline),
),
child: Icon(Icons.refresh_rounded,
color: cs.onSurfaceVariant, size: 16),
),
),
],
),
),
Container(height: 1, color: cs.outline),
Expanded(
child: GetBuilder<PackageController>(
builder: (controller) {
if (controller.isLoading.value) {
return Center(
@@ -41,71 +95,10 @@ class PackageUpdateScreen extends StatelessWidget {
);
},
),
);
}
PreferredSizeWidget _buildAppBar(ColorScheme cs) {
return AppBar(
backgroundColor: cs.surface,
elevation: 0,
surfaceTintColor: Colors.transparent,
leading: GestureDetector(
onTap: () => Get.back(),
child: Container(
margin: const EdgeInsets.all(10),
decoration: BoxDecoration(
color: cs.surfaceContainerHighest,
borderRadius: BorderRadius.circular(10),
border: Border.all(color: cs.outline),
),
child: Icon(Icons.arrow_back_ios_new_rounded,
color: cs.onSurfaceVariant, size: 16),
),
),
title: Row(
children: [
Container(
padding: const EdgeInsets.all(7),
decoration: BoxDecoration(
color: cs.primary.withValues(alpha: 0.12),
borderRadius: BorderRadius.circular(9),
border: Border.all(color: cs.primary.withValues(alpha: 0.25)),
),
child: Icon(Icons.system_update_rounded,
color: cs.primary, size: 16),
),
const SizedBox(width: 10),
Text(
'تحديث التطبيق',
style: TextStyle(
color: cs.onSurface,
fontSize: 17,
fontWeight: FontWeight.w600,
),
),
],
),
actions: [
GestureDetector(
onTap: () => packageController.fetchPackages(),
child: Container(
margin: const EdgeInsets.only(right: 16),
padding: const EdgeInsets.all(8),
decoration: BoxDecoration(
color: cs.surfaceContainerHighest,
borderRadius: BorderRadius.circular(10),
border: Border.all(color: cs.outline),
),
child: Icon(Icons.refresh_rounded,
color: cs.onSurfaceVariant, size: 18),
),
),
],
bottom: PreferredSize(
preferredSize: const Size.fromHeight(1),
child: Container(height: 1, color: cs.outline),
),
);
),
],
),
);
}
Widget _buildPackageCard(