FlutterEarthGlobeController class

This class is the controller of the RotatingGlobe widget.

It is used to add/remove/update points and connections. It is also used to control the rotation of the globe. It is also used to load the surface and background images. It is also used to set the style of the sphere. It is also used to listen to the events of the globe.

Inheritance

Constructors

FlutterEarthGlobeController({ImageProvider<Object>? surface, ImageProvider<Object>? background, double rotationSpeed = 0.2, bool isZoomEnabled = true, double zoom = 1, double maxZoom = 1.6, double minZoom = 0.1, bool isRotating = false, bool isBackgroundFollowingSphereRotation = false, ImageConfiguration surfaceConfiguration = const ImageConfiguration(), ImageConfiguration backgroundConfiguration = const ImageConfiguration(), SphereStyle sphereStyle = const SphereStyle()})

Properties

background Image?
getter/setter pair
backgroundConfiguration ImageConfiguration
getter/setter pair
connections List<AnimatedPointConnection>
getter/setter pair
globeKey GlobalKey<RotatingGlobeState>
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
isBackgroundFollowingSphereRotation bool
getter/setter pair
isReady bool
Returns true if the globe is ready
no setter
isRotating bool
Returns true if the globe is rotating
getter/setter pair
isZoomEnabled bool
getter/setter pair
maxZoom double
getter/setter pair
minZoom double
getter/setter pair
onLoaded VoidCallback?
A callback function that is called when the globe is loaded.
getter/setter pair
onPointConnectionAdded ↔ dynamic Function(AnimatedPointConnection connection, {required bool animateDraw, required Duration animateDrawDuration})?
getter/setter pair
onResetGlobeRotation ↔ dynamic Function()?
getter/setter pair
points List<Point>
getter/setter pair
rotationController AnimationController
getter/setter pair
rotationSpeed double
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sphereStyle SphereStyle
getter/setter pair
surface Image?
getter/setter pair
surfaceConfiguration ImageConfiguration
getter/setter pair
surfaceProcessed Uint32List?
getter/setter pair
zoom double
getter/setter pair

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
addPoint(Point point) → void
Adds a point to the globe.
addPointConnection(PointConnection connection, {bool animateDraw = false, Duration animateDrawDuration = const Duration(seconds: 2)}) → void
Adds a connection between two points to the globe.
dispose() → void
Disposes the controller.
override
focusOnCoordinates(GlobeCoordinates coordinates, {bool animate = false, Duration? duration = const Duration(milliseconds: 500)}) → void
Focuses on the coordinates on the globe.
load() → void
loadBackground(ImageProvider<Object> image, {ImageConfiguration configuration = const ImageConfiguration(), bool isBackgroundFollowingSphereRotation = false}) → void
Loads the background image for the rotating globe.
loadSurface(ImageProvider<Object> image, {ImageConfiguration configuration = const ImageConfiguration()}) → void
Loads the image as the surface of the globe.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
removeBackground() → void
Removes the background of the rotating globe.
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
removePoint(String id) → void
Removes the point from the globe.
removePointConnection(String id) → void
Removes the connection between two points from the globe.
resetRotation() → void
Resets the rotation of the globe.
setRotationSpeed(double rotationSpeed) → void
Sets the rotation speed of the globe.
setSphereStyle(SphereStyle style) → void
Sets the style of the rotating globe's sphere.
setZoom(double zoom) → void
Sets the zoom level of the globe.
startRotation({double? rotationSpeed}) → void
Starts the rotation of the globe.
stopRotation() → void
Stops the rotation of the globe.
toggleRotation() → void
Toggles the rotation of the globe.
toString() String
A string representation of this object.
inherited
updatePoint(String id, {String? label, Widget? labelBuilder(BuildContext context, Point point, bool isHovering, bool isVisible)?, bool? isLabelVisible, Offset? labelOffset, PointStyle? style, TextStyle? labelTextStyle, VoidCallback? onTap, VoidCallback? onHover}) → void
Updates the point on the globe.
updatePointConnection(String id, {String? label, Widget? labelBuilder(BuildContext context, PointConnection pointConnection, bool isHovering, bool isVisible)?, bool? isLabelVisible, Offset? labelOffset, bool? isMoving, PointConnectionStyle? style, TextStyle? labelTextStyle, VoidCallback? onTap, VoidCallback? onHover}) → void
Updates the connection between two points on the globe.

Operators

operator ==(Object other) bool
The equality operator.
inherited