Skip to content

Conversation

@malibayram
Copy link
Contributor

Overview

This PR updates the WebViewX Plus package with improvements to web implementation and dependency updates, enhancing compatibility and maintainability across platforms.

Changes

  • Updated usage of platform interface: changed calls to .toJS since it is not working with flutter version 3.32.0 _WebViewXState.
  • Bumped multiple dependencies in pubspec.yaml for improved stability and access to the latest features:
    • http: ^1.1.1 → ^1.4.0
    • path: ^1.8.0 → ^1.9.1
    • pointer_interceptor: ^0.10.0 → ^0.10.1+2
    • uuid: ^4.2.2 → ^4.5.1
    • webview_flutter: ^4.7.0 → ^4.13.0
    • webview_flutter_android: ^3.16.1 → ^4.7.0
    • webview_flutter_platform_interface: ^2.10.0 → ^2.13.0
    • webview_flutter_wkwebview: ^3.13.1 → ^3.22.0
    • web: ^0.5.1 → ^1.1.1
  • Updated package version to 0.5.2+1.

…efactor web.dart to use toJS method for JavaScript interop.
@groksrc
Copy link

groksrc commented Jul 8, 2025

I could really use this. My FlutterFlow project is broken without it and may need to find a different library or else resort to my own private fork.

@groksrc
Copy link

groksrc commented Jul 9, 2025

FWIW, this PR compiles and runs but it's not quite enough. Javascript interop is broken now. No longer need to call toJSBox here it seems, doing so results in a runtime error.

/// This function allows you to evaluate 'raw' javascript (e.g: 2+2)
  /// If you need to call a function you should use the method above ([callJsMethod])
  ///
  /// The [inGlobalContext] param should be set to true if you wish to eval your code
  /// in the 'window' context, instead of doing it inside the corresponding iFrame's 'window'
  ///
  /// For more info, check Mozilla documentation on 'window'
  @override
  Future<dynamic> evalRawJavascript(
    String rawJavascript, {
    bool inGlobalContext = false,
  }) {
    final result = (inGlobalContext ? js.globalContext : connector).callMethod(
      'eval'.toJS,
      [rawJavascript].toJSBox,
    );
    return Future<dynamic>.value(result);
  }

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

Successfully merging this pull request may close these issues.

2 participants