showStreamDialog method

void showStreamDialog(
  1. {required BuildContext context,
  2. required WidgetRef ref,
  3. required AppModel appModel}
)

Shows the dialog where the user can enter a link.

Implementation

void showStreamDialog({
  required BuildContext context,
  required WidgetRef ref,
  required AppModel appModel,
}) {
  showDialog(
    context: context,
    builder: (context) => NetworkStreamDialogPage(
      onPlay: (videoUrl) {
        Navigator.pop(context);

        MediaItem item = getMediaItemFromUrl(videoUrl: videoUrl);

        appModel.openMedia(
          context: context,
          ref: ref,
          mediaSource: this,
          item: item,
        );
      },
    ),
  );
}