openLinkAction method

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

Open address bar dialog.

Implementation

void openLinkAction(
    {required BuildContext context,
    required WidgetRef ref,
    required AppModel appModel}) async {
  await showDialog(
    context: context,
    builder: (context) => BrowserDialogPage(
      text: lastAddress,
      onBrowse: (url) {
        MediaItem item = generateMediaItem(
          BrowserBookmark(
            name: '',
            url: url,
          ),
        );

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