POLISHING STUFF and Smarter AI, and alot i mean.. ALOT OF BUG FIX AND OPTIMIZE
This commit is contained in:
+70
-64
@@ -14,7 +14,10 @@ import '../../../core/network/api_client.dart';
|
||||
import '../../../core/services/websocket_service.dart';
|
||||
import '../../../core/services/incoming_call_polling_service.dart';
|
||||
import '../../../core/storage/secure_storage.dart';
|
||||
import '../../../core/theme/app_colors.dart';
|
||||
import '../../../core/theme/app_decorations.dart';
|
||||
import '../../../core/utils/operation_guard.dart';
|
||||
import '../../../shared/widgets/animations/animations.dart';
|
||||
|
||||
// ââ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Âۉâ€Â€
|
||||
// GUARDIAN DASHBOARD SCREEN
|
||||
@@ -382,7 +385,7 @@ class _GuardianDashboardScreenState extends State<GuardianDashboardScreen>
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: const Color(0xFFF0F4FF),
|
||||
backgroundColor: AppColors.softBlueBg,
|
||||
body: SafeArea(
|
||||
child: Column(
|
||||
children: [
|
||||
@@ -398,24 +401,26 @@ class _GuardianDashboardScreenState extends State<GuardianDashboardScreen>
|
||||
child: SingleChildScrollView(
|
||||
physics: const AlwaysScrollableScrollPhysics(),
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
_buildGreetingRow(),
|
||||
const SizedBox(height: 14),
|
||||
if (_sosAlert || _pendingSos.isNotEmpty) ...[
|
||||
_buildSosBanner(),
|
||||
child: FadeSlideWrapper(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
_buildGreetingRow(),
|
||||
const SizedBox(height: 14),
|
||||
if (_sosAlert || _pendingSos.isNotEmpty) ...[
|
||||
_buildSosBanner(),
|
||||
const SizedBox(height: 14),
|
||||
],
|
||||
_buildKpiStrip(),
|
||||
const SizedBox(height: 14),
|
||||
_buildMainRow(),
|
||||
const SizedBox(height: 14),
|
||||
_buildActivitySection(),
|
||||
const SizedBox(height: 14),
|
||||
_buildQuickActions(),
|
||||
const SizedBox(height: 8),
|
||||
],
|
||||
_buildKpiStrip(),
|
||||
const SizedBox(height: 14),
|
||||
_buildMainRow(),
|
||||
const SizedBox(height: 14),
|
||||
_buildActivitySection(),
|
||||
const SizedBox(height: 14),
|
||||
_buildQuickActions(),
|
||||
const SizedBox(height: 8),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -1613,13 +1618,17 @@ class _KpiCard extends StatelessWidget {
|
||||
padding: const EdgeInsets.all(12),
|
||||
decoration: BoxDecoration(
|
||||
color: highlight ? const Color(0xFFFFF1F2) : Colors.white,
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
borderRadius: AppDecorations.cardRadius,
|
||||
border: Border.all(
|
||||
color: highlight ? const Color(0xFFFECACA) : const Color(0xFFE2E8F0),
|
||||
width: 1,
|
||||
),
|
||||
boxShadow: [
|
||||
BoxShadow(color: Colors.black.withValues(alpha: 0.03), blurRadius: 8),
|
||||
boxShadow: const [
|
||||
BoxShadow(
|
||||
color: Color(0x14000000),
|
||||
blurRadius: 20,
|
||||
offset: Offset(0, 4),
|
||||
),
|
||||
],
|
||||
),
|
||||
child: Column(
|
||||
@@ -1745,53 +1754,50 @@ class _QuickActionCard extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Material(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
child: InkWell(
|
||||
onTap: item.onTap,
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
child: Container(
|
||||
padding: const EdgeInsets.all(10),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
border: Border.all(color: const Color(0xFFE2E8F0)),
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Container(
|
||||
width: 28,
|
||||
height: 28,
|
||||
decoration: BoxDecoration(
|
||||
color: item.color.withValues(alpha: 0.1),
|
||||
borderRadius: BorderRadius.circular(7),
|
||||
),
|
||||
child: Icon(item.icon, size: 15, color: item.color),
|
||||
return BounceTap(
|
||||
onTap: item.onTap,
|
||||
child: Container(
|
||||
padding: const EdgeInsets.all(10),
|
||||
decoration: BoxDecoration(
|
||||
color: AppColors.cardWhite,
|
||||
borderRadius: AppDecorations.cardRadius,
|
||||
border: Border.all(color: const Color(0xFFE2E8F0)),
|
||||
boxShadow: AppDecorations.cardShadow,
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Container(
|
||||
width: 28,
|
||||
height: 28,
|
||||
decoration: BoxDecoration(
|
||||
color: item.color.withValues(alpha: 0.1),
|
||||
borderRadius: BorderRadius.circular(7),
|
||||
),
|
||||
const SizedBox(height: 6),
|
||||
Text(
|
||||
item.label,
|
||||
style: GoogleFonts.inter(
|
||||
fontSize: 11,
|
||||
fontWeight: FontWeight.w700,
|
||||
color: const Color(0xFF0F172A),
|
||||
),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
child: Icon(item.icon, size: 15, color: item.color),
|
||||
),
|
||||
const SizedBox(height: 6),
|
||||
Text(
|
||||
item.label,
|
||||
style: GoogleFonts.inter(
|
||||
fontSize: 11,
|
||||
fontWeight: FontWeight.w700,
|
||||
color: const Color(0xFF0F172A),
|
||||
),
|
||||
Text(
|
||||
item.sub,
|
||||
style: GoogleFonts.inter(
|
||||
fontSize: 10,
|
||||
color: const Color(0xFF94A3B8),
|
||||
),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
Text(
|
||||
item.sub,
|
||||
style: GoogleFonts.inter(
|
||||
fontSize: 10,
|
||||
color: const Color(0xFF94A3B8),
|
||||
),
|
||||
],
|
||||
),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user