sendKmlFromAssets method

Future<void> sendKmlFromAssets(
  1. String assetPath, {
  2. List<String> images = const [],
})

Sends a KML file from the assets folder to the Liquid Galaxy system.

assetPath is the path to the KML file in the assets folder.

Implementation

Future<void> sendKmlFromAssets(String assetPath,
    {List<String> images = const []}) async {
  // Load the KML file content from the assets folder
  final kml = await rootBundle.loadString(assetPath);

  // Send the KML content to the master
  await sshConnection.sendKml(kml, images: images);
}