displayImageOnLG method

Future<void> displayImageOnLG(
  1. String imgUrl
)

Displays an image on the Liquid Galaxy system using Chromium.

Requires display_images_service to be installed on the Liquid Galaxy system.

imgUrl is the URL of the image to be displayed.

Implementation

Future<void> displayImageOnLG(String imgUrl) async {
  final String? pw = await sshConnection.password;

  if (!await sshConnection.isConnected() || pw == null) {
    return;
  }

  await sshConnection.sendCommand(
      'bash display_images_service/scripts/open.sh $pw $imgUrl ${sshConnection.screenAmount}');
}