Каждое местоположение имеет цветовой кодировку на основе параметра. Однако, когда я пытаюсь использовать Colors.green или Colors.
Код: Выделить всё
Future _markDatabaseRecords() async {
try {
final records = await _dataService.getRecords();
await mapController.removeAllShapes();
for (final record in records) {
if (record.latitude != 0.0 && record.longitude != 0.0) {
final value = _getParameterValue(record);
await mapController.drawRect(
RectOSM(
key: "record_${record.id}",
centerPoint: GeoPoint(latitude: record.latitude, longitude: record.longitude),
distance: 6,
color: Colors.green,
borderColor: Colors.green,
strokeWidth: 6,
),
);
} else {
debugPrint("Skipping record with invalid coordinates: ${record.id}");
}
}
} catch (e) {
debugPrint("Failed to mark database records: $e");
}
}
< /code>
Я также попробовал вручную создать цвет таким: < /p>
Color.fromARGB(255, 0, 255, 0) // still shows up as purple
Что я попробовал:
Использование color.lerp () с разными комбинациями
Обеспечение Alpha = 255
Использование оба DrawCircle и DrawRect
/> Вопросы: < /p>
Есть ли известная проблема с цветовым рендерингом в Flutter_osm_plugin?>
Подробнее здесь: https://stackoverflow.com/questions/796 ... tter-osm-p