setSunPosition method
Sets the sun's position for the day/night cycle effect.
The longitude parameter specifies the sun's longitude in degrees (-180 to 180).
The latitude parameter specifies the sun's latitude in degrees (-23.5 to 23.5 for realistic Earth tilt).
Example usage:
controller.setSunPosition(longitude: 45.0, latitude: 10.0);
Implementation
void setSunPosition({double? longitude, double? latitude}) {
if (longitude != null) {
sunLongitude = longitude;
}
if (latitude != null) {
sunLatitude = latitude;
}
notifyListeners();
}