FlutterEarthGlobeController constructor

FlutterEarthGlobeController({
  1. ImageProvider<Object>? surface,
  2. ImageProvider<Object>? background,
  3. double rotationSpeed = 0.2,
  4. bool isZoomEnabled = true,
  5. double zoom = 1,
  6. double maxZoom = 1.6,
  7. double minZoom = 0.1,
  8. bool isRotating = false,
  9. bool isBackgroundFollowingSphereRotation = false,
  10. ImageConfiguration surfaceConfiguration = const ImageConfiguration(),
  11. ImageConfiguration backgroundConfiguration = const ImageConfiguration(),
  12. SphereStyle sphereStyle = const SphereStyle(),
})

Implementation

FlutterEarthGlobeController({
  ImageProvider? surface,
  ImageProvider? background,
  this.rotationSpeed = 0.2,
  this.isZoomEnabled = true,
  this.zoom = 1,
  this.maxZoom = 1.6,
  this.minZoom = 0.1,
  bool isRotating = false,
  this.isBackgroundFollowingSphereRotation = false,
  this.surfaceConfiguration = const ImageConfiguration(),
  this.backgroundConfiguration = const ImageConfiguration(),
  this.sphereStyle = const SphereStyle(),
}) {
  assert(minZoom < maxZoom);
  assert(zoom >= minZoom && zoom <= maxZoom);
  _isRotating = isRotating;
  if (surface != null) {
    loadSurface(surface);
  }

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