Update: 2026-07-04 04:05:08

This commit is contained in:
Hamza-Ayed
2026-07-04 04:05:08 +03:00
parent e4ba962ab6
commit c7bd644b88
14 changed files with 807 additions and 26 deletions
@@ -326,6 +326,42 @@ class _AppBarControls extends StatelessWidget {
onTap: c.toggleHeatmap,
),
),
// Predictive Demand
GetBuilder<HomeCaptainController>(
builder: (c) => Stack(
clipBehavior: Clip.none,
children: [
_IconBtn(
icon: Icons.auto_awesome_rounded,
color: c.isPredictiveVisible
? const Color(0xFF0EA5E9)
: Colors.grey.shade600,
tooltip: 'Predictive Demand'.tr,
onTap: c.togglePredictiveDemand,
),
if (c.isPredictiveVisible && c.predictiveZones.isNotEmpty)
Positioned(
top: -4,
right: -4,
child: Container(
padding: const EdgeInsets.all(3),
decoration: const BoxDecoration(
color: Color(0xFF0EA5E9),
shape: BoxShape.circle,
),
child: Text(
'${c.predictiveZones.length}',
style: const TextStyle(
color: Colors.white,
fontSize: 8,
fontWeight: FontWeight.bold,
),
),
),
),
],
),
),
// Center on me
_IconBtn(
icon: Icons.my_location_rounded,
@@ -398,7 +434,10 @@ class _MapView extends StatelessWidget {
mapType: s.isMapDarkMode
? IntaleqMapType.normal
: IntaleqMapType.light,
polygons: ctrl.heatmapPolygons,
polygons: {
...ctrl.heatmapPolygons,
...ctrl.predictivePolygons,
},
markers: {
Marker(
markerId: MarkerId('MyLocation'.tr),