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] #316

Closed
evalsxonted opened this issue Sep 4, 2022 · 1 comment
Closed

[BUG] #316

evalsxonted opened this issue Sep 4, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@evalsxonted
Copy link

evalsxonted commented Sep 4, 2022

Describe the bug
not working, I cannot write anything.
To Reproduce
Steps to reproduce the behavior:

` class Start extends ConsumerWidget {
  const Start({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context, WidgetRef ref) {
    return MaterialApp(
      
      home: WidgetTester(),
    );
  }
}

class WidgetTester extends ConsumerStatefulWidget {
  const WidgetTester({
    Key? key,
  }) : super(key: key);

  @override
  ConsumerState createState() => _WidgetTesterState();
}

class _WidgetTesterState extends ConsumerState<WidgetTester> {
  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {

    return Scaffold(
      body: Center(
          child: Container(
            padding: EdgeInsets.all(ref.read(sizesProvider).paddingM),
            margin: EdgeInsets.all(ref.read(sizesProvider).paddingM),
            decoration: BoxDecoration(
              borderRadius: BorderRadius.circular(
                  ref.read(sizesProvider).inputRadius),
              border: Border.all(
                  color: ref.watch(colorsProvider).hint,
                  width: ref.read(sizesProvider).borderWidth),
            ),
            child: HtmlEditor(
              controller: HtmlEditorController(
                processInputHtml: true,
                processOutputHtml: true,
                processNewLineAsBr: true
              ), //required
              htmlEditorOptions: const HtmlEditorOptions(
                hint: "Your text here...",
                initialText: "text content initial, if any",
              ),
htmlToolbarOptions: HtmlToolbarOptions(toolbarPosition: ToolbarPosition.belowEditor),
            ),
          ),),
    );
  }
}`

Expected behavior
I expect that i can write something
Screenshots
If applicable, add screenshots to help explain your problem.

Device:
Emulator ( nexus 4 api 30)
Additional context
I use riverpod package
Error
E/flutter ( 5255): [ERROR:flutter/lib/ui/ui_dart_state.cc(198)] Unhandled Exception: PlatformException(error, java.lang.IllegalStateException: Trying to create a platform view of unregistered type: com.pichillilorenzo/flutter_inappwebview
E/flutter ( 5255): at io.flutter.plugin.platform.PlatformViewsController$1.createForTextureLayer(PlatformViewsController.java:189)
E/flutter ( 5255): at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.create(PlatformViewsChannel.java:122)
E/flutter ( 5255): at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.onMethodCall(PlatformViewsChannel.java:60)
E/flutter ( 5255): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:262)
E/flutter ( 5255): at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:295)
E/flutter ( 5255): at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$DartMessenger(DartMessenger.java:319)
E/flutter ( 5255): at io.flutter.embedding.engine.dart.-$$Lambda$DartMessenger$TsixYUB5E6FpKhMtCSQVHKE89gQ.run(Unknown Source:12)
E/flutter ( 5255): at android.os.Handler.handleCallback(Handler.java:938)
E/flutter ( 5255): at android.os.Handler.dispatchMessage(Handler.java:99)
E/flutter ( 5255): at android.os.Looper.loop(Looper.java:223)
E/flutter ( 5255): at android.app.ActivityThread.main(ActivityThread.java:7656)
E/flutter ( 5255): at java.lang.reflect.Method.invoke(Native Method)
E/flutter ( 5255): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
E/flutter ( 5255): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
E/flutter ( 5255): , null, null)
E/flutter ( 5255): #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:607:7)
E/flutter ( 5255): #1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:167:18)
E/flutter ( 5255):
E/flutter ( 5255): #2 TextureAndroidViewController._sendCreateMessage (package:flutter/src/services/platform_views.dart:1134:18)
E/flutter ( 5255):
E/flutter ( 5255): #3 AndroidViewController.create (package:flutter/src/services/platform_views.dart:762:5)
E/flutter ( 5255):
E/flutter ( 5255): #4 TextureAndroidViewController.setSize (package:flutter/src/services/platform_views.dart:1062:7)
E/flutter ( 5255):
E/flutter ( 5255): #5 RenderAndroidView._sizePlatformView (package:flutter/src/rendering/platform_view.dart:179:29)
E/flutter ( 5255):
E/flutter ( 5255):
E/PlatformViewsController( 5255): Sending touch to an unknown view with id: 0

@evalsxonted evalsxonted added the bug Something isn't working label Sep 4, 2022
@tneotia
Copy link
Owner

tneotia commented Oct 19, 2022

Please check and make sure you followed the initialization code required for webviews to function.

@tneotia tneotia closed this as completed Oct 19, 2022
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

2 participants