showImageSlider static method

Future<void> showImageSlider({
  1. required List<String> images,
  2. int startingPosition = 0,
})

Implementation

static Future<void> showImageSlider({
  required List<String> images,
  int startingPosition = 0,
}) async {
  try {
    List<String> imagesList = [];
    images.forEach((image) => imagesList.add(image));
    await _channel.invokeMethod(
      'showImageViewer',
      {
        "list": imagesList,
        "position": startingPosition,
      },
    );
  } on PlatformException catch (e) {
    print(e.message);
  }
}