إصلاح أخطاء شاشة الكباتن من تحديث الذكاء الاصطناعي
This commit is contained in:
@@ -30,67 +30,86 @@ class _TransitOrgListPageState extends State<TransitOrgListPage> {
|
||||
return GetBuilder<TransitAdminController>(
|
||||
builder: (c) => Scaffold(
|
||||
backgroundColor: cs.surface,
|
||||
appBar: AppBar(
|
||||
backgroundColor: cs.surface,
|
||||
elevation: 0,
|
||||
title: Text('مواصلاتي — المؤسسات',
|
||||
style: TextStyle(color: cs.onSurface)),
|
||||
iconTheme: IconThemeData(color: cs.onSurface),
|
||||
actions: [
|
||||
IconButton(
|
||||
icon: Icon(Icons.route_rounded, color: cs.tertiary),
|
||||
tooltip: 'اعتماد الخطوط',
|
||||
onPressed: () => Get.to(() => const RouteApprovalPage()),
|
||||
),
|
||||
IconButton(
|
||||
icon: Icon(Icons.add, color: cs.primary),
|
||||
onPressed: () async {
|
||||
final created = await Get.to(() => const TransitOrgCreatePage());
|
||||
if (created == true) c.fetchOrgs();
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
body: Column(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(12),
|
||||
child: TextField(
|
||||
controller: _searchCtrl,
|
||||
style: TextStyle(color: cs.onSurface),
|
||||
onSubmitted: (v) {
|
||||
c.searchQuery = v;
|
||||
c.fetchOrgs();
|
||||
},
|
||||
decoration: InputDecoration(
|
||||
hintText: 'ابحث عن مؤسسة...',
|
||||
hintStyle: TextStyle(color: cs.onSurfaceVariant),
|
||||
prefixIcon: Icon(Icons.search, color: cs.onSurfaceVariant),
|
||||
filled: true,
|
||||
fillColor: cs.surfaceContainerHighest,
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
borderSide: BorderSide.none,
|
||||
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),
|
||||
Text('مواصلاتي — المؤسسات', style: TextStyle(color: cs.onSurface, fontSize: 18, fontWeight: FontWeight.w700)),
|
||||
const Spacer(),
|
||||
IconButton(
|
||||
icon: Icon(Icons.route_rounded, color: cs.tertiary),
|
||||
tooltip: 'اعتماد الخطوط',
|
||||
onPressed: () => Get.to(() => const RouteApprovalPage()),
|
||||
),
|
||||
IconButton(
|
||||
icon: Icon(Icons.add, color: cs.primary),
|
||||
onPressed: () async {
|
||||
final created = await Get.to(() => const TransitOrgCreatePage());
|
||||
if (created == true) c.fetchOrgs();
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: c.isLoadingList
|
||||
? Center(child: CircularProgressIndicator(color: cs.primary))
|
||||
: c.orgs.isEmpty
|
||||
? Center(
|
||||
child: Text('لا توجد مؤسسات',
|
||||
style: TextStyle(color: cs.onSurfaceVariant)),
|
||||
)
|
||||
: RefreshIndicator(
|
||||
onRefresh: c.fetchOrgs,
|
||||
child: ListView.builder(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12),
|
||||
itemCount: c.orgs.length,
|
||||
itemBuilder: (_, i) => _orgCard(c.orgs[i], cs),
|
||||
),
|
||||
child: Column(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(12),
|
||||
child: TextField(
|
||||
controller: _searchCtrl,
|
||||
style: TextStyle(color: cs.onSurface),
|
||||
onSubmitted: (v) {
|
||||
c.searchQuery = v;
|
||||
c.fetchOrgs();
|
||||
},
|
||||
decoration: InputDecoration(
|
||||
hintText: 'ابحث عن مؤسسة...',
|
||||
hintStyle: TextStyle(color: cs.onSurfaceVariant),
|
||||
prefixIcon: Icon(Icons.search, color: cs.onSurfaceVariant),
|
||||
filled: true,
|
||||
fillColor: cs.surfaceContainerHighest,
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
borderSide: BorderSide.none,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: c.isLoadingList
|
||||
? Center(child: CircularProgressIndicator(color: cs.primary))
|
||||
: c.orgs.isEmpty
|
||||
? Center(
|
||||
child: Text('لا توجد مؤسسات',
|
||||
style: TextStyle(color: cs.onSurfaceVariant)),
|
||||
)
|
||||
: RefreshIndicator(
|
||||
onRefresh: c.fetchOrgs,
|
||||
child: ListView.builder(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12),
|
||||
itemCount: c.orgs.length,
|
||||
itemBuilder: (_, i) => _orgCard(c.orgs[i], cs),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user