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

MissingPluginException(No implementation found for method ) #2461

Open
1 of 2 tasks
neeluagrawal04 opened this issue Dec 16, 2024 · 0 comments
Open
1 of 2 tasks

MissingPluginException(No implementation found for method ) #2461

neeluagrawal04 opened this issue Dec 16, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@neeluagrawal04
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

I am getting the crash on firebase
MissingPluginException(No implementation found for method loadData on channel com.pichillilorenzo/flutter_inappwebview_632)
MethodChannel._invokeMethod

Expected Behavior

crash should not be there on firebase

Steps with code example to reproduce

_updateTextSize(InAppWebViewController? webViewController) async {
int textSize = selectedFontSize.value.toInt();
if (selectedFontSize.value == 12) {
textSize = 100;
} else if (selectedFontSize.value == 16) {
textSize = 120;
} else if (selectedFontSize.value == 20) {
textSize = 140;
} else if (selectedFontSize.value == 24) {
textSize = 180;
}

try {
  if (!kIsWeb && defaultTargetPlatform == TargetPlatform.android) {
    await webViewController?.setSettings(
        settings: InAppWebViewSettings(textZoom: textSize));
  } else {
    // update current text size
    await webViewController?.evaluateJavascript(source: """
          document.body.style.textSizeAdjust = '$textSize%';
          document.body.style.webkitTextSizeAdjust = '$textSize%';
        """);

    // update the User Script for the next page load
    await webViewController?.removeUserScript(
        userScript: textSizeUserScript);
    textSizeUserScript.source =
        kTextSizeSourceJS.replaceAll(kTextSizePlaceholder, '$textSize');
    await webViewController?.addUserScript(userScript: textSizeUserScript);
  }
} catch (e) {
  LogManager.logError('unable to change font size');
}

_updateFontSize(InAppWebViewController? controller) {
try {
if (Get.context!.isPhone) {
_updateTextSize(controller);
} else {
int textSize = selectedFontSize.value.toInt();
if (selectedFontSize.value == 12) {
textSize = 14;
} else if (selectedFontSize.value == 16) {
textSize = 18;
} else if (selectedFontSize.value == 20) {
textSize = 21;
} else if (selectedFontSize.value == 24) {
textSize = 24;
}
controller?.evaluateJavascript(
source:
"document.getElementsByTagName('body')[0].style.fontSize = '${textSize}px'");
}
} on Exception catch (err) {
LogManager.logError(err.toString());
}
}

Stacktrace/Logs

      Fatal Exception: FlutterError

0 ??? 0x0 MethodChannel._invokeMethod + 332 (platform_channel.dart:332)
1 ??? 0x0 IOSInAppWebViewController.loadData + 1842 (in_app_webview_controller.dart:1842)

Flutter version

v3.24.3

Operating System, Device-specific and/or Tool

ios 17.0+

Plugin version

v6.1.0, v6.0.0

Additional information

No response

Self grab

  • I'm ready to work on this issue!
@neeluagrawal04 neeluagrawal04 added the bug Something isn't working label Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant