prahack / vimeo_player

Flutter Vimeo Player
https://pub.dev/packages/vimeo_player_flutter
MIT License
10 stars 20 forks source link

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

Open MojtabaTavakkoli opened 12 months ago

MojtabaTavakkoli commented 12 months ago

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 commented 12 months ago

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