Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A platform implementation for webview_flutter has not been set. #15

Open
MojtabaTavakkoli opened this issue Nov 22, 2023 · 1 comment
Open

Comments

@MojtabaTavakkoli
Copy link

I'm getting the following error when running the example project on flutter web :

image
selectable content:


══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
The following assertion was thrown building Container(constraints: BoxConstraints(0.0<=w<=Infinity,
h=250.0)):
Assertion failed:
file:///C:/Users/mojta/AppData/Local/Pub/Cache/hosted/pub.dev/webview_flutter_platform_interface-2.6.0/lib/src/platform_webview_controller.dart:26:7
WebViewPlatform.instance != null
"A platform implementation for `webview_flutter` has not been set. Please ensure that an
implementation of `WebViewPlatform` has been set to `WebViewPlatform.instance` before use. For unit
testing, `WebViewPlatform.instance` can be set with your own test implementation."

The relevant error-causing widget was:
  Container
  Container:file:///C:/Users/mojta/Downloads/Compressed/vimeo_player-master/vimeo_player-master/example/lib/main.dart:42:13

When the exception was thrown, this was the stack:
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 294:49            throw_
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 35:3              assertFailed
packages/webview_flutter_platform_interface/src/platform_webview_controller.dart 26:32  new
packages/webview_flutter/src/webview_controller.dart 101:11                             fromPlatformCreationParams
packages/vimeo_player_flutter/vimeo_player_flutter.dart 28:23                           new
packages/vimeo_player_flutter/vimeo_player_flutter.dart 24:39                           createState
packages/flutter/src/widgets/framework.dart 5381:24                                     new

flutter doctor:
image

@MojtabaTavakkoli
Copy link
Author

I know that the package doesn't currently support web but I was wondering if there is any temporary approach for it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant