presentation-displays icon indicating copy to clipboard operation
presentation-displays copied to clipboard

Sending Webview to Second Screen

Open makgabri opened this issue 3 years ago • 8 comments

Describe the bug I have copied the example code and attempted to replace the second screen with a webview. I can transmit data and text can be shown properly as I used a scaffold and set the title to whatever data I sent from the primary screen to the second screen. However, I am getting an error when trying to display a webview. Not sure if this is an installation issue but I am able to load the webview on the primary page.

To Reproduce Steps to reproduce the behavior:

  1. Go to copy example code.
  2. Replace the build in second screen with: Widget build(BuildContext context) { return SecondaryDisplay( callback: (argument) { setState(() { value = argument; }); }, child: Scaffold( appBar: AppBar( title: Text("Second Screen: "+value), ), body: Center( child: WebView(initialUrl: 'https://www.google.ca',), ) // body: Center( // child: Text(value) // ) ) ); }

Expected behavior The second screen is able to display a webview.

Screenshots Getting the following errors: E/flutter (23367): [ERROR:flutter/lib/ui/ui_dart_state.cc(199)] Unhandled Exception: MissingPluginException(No implementation found for method create on channel flutter/platform_views) E/flutter (23367): #0 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:156:7) E/flutter (23367): <asynchronous suspension> E/flutter (23367): #1 AndroidViewController.create (package:flutter/src/services/platform_views.dart:748:5) E/flutter (23367): <asynchronous suspension>

Desktop (please complete the following information):

  • OS: [e.g. iOS] Android
  • Version [e.g. 22] Latest as of November 1st

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6] Sunmi T2s
  • OS: [e.g. iOS8.1] Android 9.0

makgabri avatar Nov 01 '21 11:11 makgabri

I have the same problem when using camera plugin in second screen. It seem that plugin can't use in second screen. Can someone solve this problem?

winweib avatar Nov 24 '21 09:11 winweib

Did you solved this issue?

vukhacbiet avatar Dec 30 '21 15:12 vukhacbiet

Hello, I am getting the same error, when I try to play a video on the second screen. Any advice on that?

ot-repo avatar Jun 15 '22 22:06 ot-repo

Hey question, did you get this to work at all?

figloalds avatar Sep 01 '22 19:09 figloalds

the video does not play at the start on the second screen, any advice?

trapeye avatar Nov 07 '22 11:11 trapeye

any update?

samerquta avatar Apr 18 '23 08:04 samerquta

@VNAPNIC Is it possible to get this working? Can you at least point us to right direction?

alhafoudh avatar Feb 05 '24 13:02 alhafoudh

The camera cannot be previewed on the secondary screen. how to do ?

yx-design avatar Jul 22 '24 04:07 yx-design