Update: 2026-08-03 00:20:40
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import 'package:siro_admin/constant/theme.dart';
|
||||
import 'package:siro_admin/constant/map_tiles.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_map/flutter_map.dart';
|
||||
import 'package:latlong2/latlong.dart';
|
||||
@@ -62,14 +64,14 @@ class _HeatmapPageState extends State<HeatmapPage> {
|
||||
Color markerColor;
|
||||
switch (source) {
|
||||
case 'geofence':
|
||||
markerColor = Colors.green.withValues(alpha: 0.65);
|
||||
markerColor = cs.success.withValues(alpha: 0.65);
|
||||
break;
|
||||
case 'silent_push':
|
||||
markerColor = Colors.orange.withValues(alpha: 0.55);
|
||||
markerColor = cs.warning.withValues(alpha: 0.55);
|
||||
break;
|
||||
case 'app_usage':
|
||||
default:
|
||||
markerColor = Colors.blue.withValues(alpha: 0.5);
|
||||
markerColor = cs.info.withValues(alpha: 0.5);
|
||||
}
|
||||
|
||||
return CircleMarker(
|
||||
@@ -249,10 +251,7 @@ class _HeatmapPageState extends State<HeatmapPage> {
|
||||
initialZoom: 12.0,
|
||||
),
|
||||
children: [
|
||||
TileLayer(
|
||||
urlTemplate: 'https://tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
userAgentPackageName: 'com.siromove.admin',
|
||||
),
|
||||
MapTiles.layer(context),
|
||||
CircleLayer(circles: _markers),
|
||||
],
|
||||
),
|
||||
@@ -270,11 +269,11 @@ class _HeatmapPageState extends State<HeatmapPage> {
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
_LegendItem(color: Colors.green, label: 'دخل منطقة سياج', cs: cs),
|
||||
_LegendItem(color: cs.success, label: 'دخل منطقة سياج', cs: cs),
|
||||
const SizedBox(height: 4),
|
||||
_LegendItem(color: Colors.blue, label: 'فتح عادي للتطبيق', cs: cs),
|
||||
_LegendItem(color: cs.info, label: 'فتح عادي للتطبيق', cs: cs),
|
||||
const SizedBox(height: 4),
|
||||
_LegendItem(color: Colors.orange, label: 'إيقاظ صامت', cs: cs),
|
||||
_LegendItem(color: cs.warning, label: 'إيقاظ صامت', cs: cs),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user