FlutterEarthGlobeController constructor

FlutterEarthGlobeController({
  1. ImageProvider<Object>? surface,
  2. ImageProvider<Object>? nightSurface,
  3. ImageProvider<Object>? background,
  4. double rotationSpeed = 0.2,
  5. bool isZoomEnabled = true,
  6. double zoom = 1,
  7. double maxZoom = 2.5,
  8. double minZoom = -1.0,
  9. bool isRotating = false,
  10. bool isBackgroundFollowingSphereRotation = false,
  11. ImageConfiguration surfaceConfiguration = const ImageConfiguration(),
  12. ImageConfiguration nightSurfaceConfiguration = const ImageConfiguration(),
  13. ImageConfiguration backgroundConfiguration = const ImageConfiguration(),
  14. SphereStyle sphereStyle = const SphereStyle(),
  15. bool isDayNightCycleEnabled = false,
  16. DayNightMode dayNightMode = DayNightMode.textureSwap,
  17. Color simulatedNightColor = const ui.Color.fromARGB(255, 25, 38, 64),
  18. double simulatedNightIntensity = 0.15,
  19. double sunLongitude = 0.0,
  20. double sunLatitude = 0.0,
  21. double dayNightBlendFactor = 0.15,
  22. bool useRealTimeSunPosition = false,
  23. DayNightCycleDirection dayNightCycleDirection = DayNightCycleDirection.leftToRight,
  24. double zoomSensitivity = 0.8,
  25. double panSensitivity = 1.0,
  26. bool zoomToMousePosition = false,
  27. double panOffsetX = 0.0,
  28. double panOffsetY = 0.0,
  29. bool showAtmosphere = true,
  30. Color atmosphereColor = const ui.Color.fromARGB(255, 57, 123, 185),
  31. double atmosphereBlur = 30.0,
  32. double atmosphereThickness = 0.03,
  33. double atmosphereOpacity = 0.2,
  34. bool surfaceLightingEnabled = true,
  35. double lightAngle = -45.0,
  36. double lightIntensity = 0.75,
  37. double ambientLight = 0.6,
})

Implementation

FlutterEarthGlobeController({
  ImageProvider? surface,
  ImageProvider? nightSurface,
  ImageProvider? background,
  this.rotationSpeed = 0.2,
  this.isZoomEnabled = true,
  this.zoom = 1,
  this.maxZoom = 2.5,
  this.minZoom = -1.0, // Allow zooming out further (negative = smaller globe)
  bool isRotating = false,
  this.isBackgroundFollowingSphereRotation = false,
  this.surfaceConfiguration = const ImageConfiguration(),
  this.nightSurfaceConfiguration = const ImageConfiguration(),
  this.backgroundConfiguration = const ImageConfiguration(),
  this.sphereStyle = const SphereStyle(),
  this.isDayNightCycleEnabled = false,
  DayNightMode dayNightMode = DayNightMode.textureSwap,
  Color simulatedNightColor = const ui.Color.fromARGB(255, 25, 38, 64),
  double simulatedNightIntensity = 0.15,
  this.sunLongitude = 0.0,
  this.sunLatitude = 0.0,
  this.dayNightBlendFactor = 0.15,
  this.useRealTimeSunPosition = false,
  this.dayNightCycleDirection = DayNightCycleDirection.leftToRight,
  this.zoomSensitivity = 0.8,
  this.panSensitivity = 1.0,
  this.zoomToMousePosition = false,
  this.panOffsetX = 0.0,
  this.panOffsetY = 0.0,
  bool showAtmosphere = true,
  Color atmosphereColor = const ui.Color.fromARGB(255, 57, 123, 185),
  double atmosphereBlur = 30.0,
  double atmosphereThickness = 0.03,
  double atmosphereOpacity = 0.2,
  bool surfaceLightingEnabled = true,
  double lightAngle = -45.0,
  double lightIntensity = 0.75,
  double ambientLight = 0.6,
})  : _showAtmosphere = showAtmosphere,
      _atmosphereColor = atmosphereColor,
      _atmosphereBlur = atmosphereBlur,
      _atmosphereThickness = atmosphereThickness,
      _atmosphereOpacity = atmosphereOpacity,
      _surfaceLightingEnabled = surfaceLightingEnabled,
      _lightAngle = lightAngle,
      _lightIntensity = lightIntensity,
      _ambientLight = ambientLight,
      _simulatedNightColor = simulatedNightColor,
      _simulatedNightIntensity = simulatedNightIntensity,
      _dayNightMode = dayNightMode {
  assert(minZoom < maxZoom);
  assert(zoom >= minZoom && zoom <= maxZoom);
  _isRotating = isRotating;
  if (surface != null) {
    loadSurface(surface);
  }

  if (nightSurface != null) {
    loadNightSurface(nightSurface);
  }

  if (background != null) {
    loadBackground(background);
  }
}