Code Monkey home page Code Monkey logo

Comments (11)

shah-xad avatar shah-xad commented on June 18, 2024

have you added them in your pubspec.yaml?

from webview_flutter_plus.

shah-xad avatar shah-xad commented on June 18, 2024

and I didn't see any file with the name index.caf8b167.cs in your assets.

from webview_flutter_plus.

ColtonBristow avatar ColtonBristow commented on June 18, 2024

yes it was added to the pubspec

from webview_flutter_plus.

shah-xad avatar shah-xad commented on June 18, 2024

can you share reproduceable example regarding your code?

from webview_flutter_plus.

ColtonBristow avatar ColtonBristow commented on June 18, 2024

Here is the repo https://github.com/ColtonBristow/newflutterthree . all I did was build a three js web app and tried to use it through referencing the HTML file.

from webview_flutter_plus.

ColtonBristow avatar ColtonBristow commented on June 18, 2024
class MyApp extends StatelessWidget {
  MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Help'),
        ),
        body: WebViewPlus(
          javascriptMode: JavascriptMode.unrestricted,
          onWebViewCreated: (controller) {
            final int? port = controller.serverPort;
            controller.loadUrl('EmbeddedThreeJS/dist/index.html');
          },
        ),
      ),
    );
  }
}
```

from webview_flutter_plus.

shah-xad avatar shah-xad commented on June 18, 2024

I think there's some conflict between your assets directory and pubspec.yaml. You haven't added them correctly in your yaml file. There's no dist directory in actual but you mentioned that in your code here: controller.loadUrl('EmbeddedThreeJS/dist/index.html');

from webview_flutter_plus.

ColtonBristow avatar ColtonBristow commented on June 18, 2024

I have added it correctly I don't think I took a proper screenshot. I am just copying the relative path and pasting it in the yaml

assets:
    - EmbeddedThreeJS/
    - EmbeddedThreeJS/dist/
    - EmbeddedThreeJS/dist/assets/
    - EmbeddedThreeJS/dist/index.html

here is a better ss https://gyazo.com/3fcfeaf7ee5c18b5601469b2bffc9066 and here is the error ===> Unable to load asset: assets/index.6bbb5a0d.js OR IT CAN BE ===> ErrorSummary (Unable to load asset: assets/index.caf8b167.css)

from webview_flutter_plus.

shah-xad avatar shah-xad commented on June 18, 2024

There're plenty of problems in your project, pubspec.yaml, main.dart, android manifest your HTML content, even you didn't follow the instructions for the library, Here's your fixed code but please do get familiar with the basics.

fixed.zip

from webview_flutter_plus.

ColtonBristow avatar ColtonBristow commented on June 18, 2024

could you tell me what exactly was wrong? and I did follow all the documentation that you posted as far as I know. So some feedback on how you fixed it would be great!

from webview_flutter_plus.

shah-xad avatar shah-xad commented on June 18, 2024

You hadn't added the required permissions in your android manifest. There's no directory named dist and in your pubspec you're using this. In your index.html there's also path problem.

from webview_flutter_plus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.