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

[BUG] A platform implementation for webview_flutter has not been set #213

Open
domswit opened this issue Oct 19, 2024 · 0 comments
Open

Comments

@domswit
Copy link

domswit commented Oct 19, 2024

Describe the bug
I see this error in the editor:
A platform implementation for webview_flutter has not been set

To Reproduce
Steps to reproduce the behavior:

  1. Install as per the guide
  2. Here's the versions installed:
    quill_html_editor: ^2.2.8
    webview_flutter: ^4.9.0
    flutter --version
    Flutter 3.24.3 • channel stable • https://github.com/flutter/flutter.git
    Framework • revision 2663184aa7 (5 weeks ago) • 2024-09-11 16:27:48 -0500
    Engine • revision 36335019a8
    Tools • Dart 3.5.3 • DevTools 2.37.3
  3. Implement as per the guide (whole code below)
  4. execute flutter run
  5. see the issue

Expected behavior
The editor will load properly

Screenshots
Actual App I'm making:
image

Newly Created App with only quill_html_editor installed:
image

Desktop (please complete the following information):

  • OS: Windows
  • Browser [flutter Android Emulator]

Flutter Doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.24.3, on Microsoft Windows [Version 10.0.22631.4317], locale en-PH)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
[√] Chrome - develop for the web
[√] Visual Studio - develop Windows apps (Visual Studio Build Tools 2019 16.11.41)
[√] Android Studio (version 2024.1)
[√] VS Code (version 1.94.2)
[√] Connected device (3 available)
[√] Network resources

• No issues found!

Additional context

This is the error seen in the editor:

'package:webview_flutter_platform_interface/src/platform_webview_controller.dart': Failed assertion: line 26 pos 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.
See also: https://docs.flutter.dev/testing/errors

pubspec.yaml:

dependencies:
http: ^1.2.2
flutter:
sdk: flutter
flutter_dotenv: ^5.0.2
provider: ^6.0.0
image_picker: ^1.1.2
dio: ^5.3.2
cupertino_icons: ^1.0.8
quill_html_editor: ^2.2.8
webview_flutter: ^4.9.0
path_provider: ^2.1.4

flutter --version
Flutter 3.24.3 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 2663184aa7 (5 weeks ago) • 2024-09-11 16:27:48 -0500
Engine • revision 36335019a8
Tools • Dart 3.5.3 • DevTools 2.37.3

main.dart
https://playcode.io/2051908

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