setChannel method

Future<void> setChannel({
  1. required String title,
  2. required String url,
  3. String? imagePath,
})

Set new streaming URL.

Implementation

Future<void> setChannel(
    {required String title, required String url, String? imagePath}) async {
  await Future.delayed(Duration(milliseconds: 500));
  await _methodChannel.invokeMethod('set', [title, url]);

  if (imagePath != null) setDefaultArtwork(imagePath);
}