0

I have a javascript class and Html file for Flutter web-app. Both these files are in web folder. I'm loading these using flutter class with below code :

class WebClass implements CommonAbstractClass {
  @override
  Widget build(BuildContext context) {

    ui.platformViewRegistry.registerViewFactory(
        'hello-html',
        (int viewId) => IFrameElement()
          ..width = '640'
          ..height = '360'
          ..src = 'myHtmlFile.html'
          ..style.border = 'none');
        
    return Scaffold(
      appBar: AppBar(title: const Text('Web App')),
      body: Stack(
        children: const [
          SizedBox(
              height: 500,
              child: HtmlElementView(
                viewType: 'hello-html',
              )),
        ],
      ),
    );
  }
}

Above code loads html and works well. The javascript prints the result. What I'm looking for is to get that same result (result that I'm getting in javascript) in flutter file. Is there any way to get result from html/javascript to flutter while using HtmlElementView ?

2
  • 3
    Your question is a bit confusing, what do you mean by "same result in flutter file"? Could you elaborate on the desired output? Commented Nov 30, 2022 at 9:57
  • @Phil same result means data what I'm getting in html, I want that result in flutter file. Commented Dec 2, 2022 at 12:33

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.