loadSurface method

void loadSurface(
  1. ImageProvider<Object> image, {
  2. ImageConfiguration configuration = const ImageConfiguration(),
})

Loads the image as the surface of the globe.

The image parameter represents the image to be loaded as the surface of the globe. The configuration parameter is optional and can be used to customize the image configuration.

Example usage:

controller.loadSurface(
 AssetImage('assets/earth.jpg'),
);

Implementation

void loadSurface(
  ImageProvider image, {
  ImageConfiguration configuration = const ImageConfiguration(),
}) {
  image
      .resolve(configuration)
      .addListener(ImageStreamListener((info, _) async {
    surface = info.image;
    surfaceConfiguration = configuration;
    surfaceProcessed = await convertImageToUint32List(info.image);
    notifyListeners();
  }));
}