How to use JavaScript in Flutter Apps?

แชร์
ฝัง
  • เผยแพร่เมื่อ 17 ม.ค. 2025

ความคิดเห็น • 22

  • @romeubeatotech
    @romeubeatotech 3 ปีที่แล้ว +9

    Nice! But how about if you have a full js scrip instead of the add() function? rootBundle.loadStrig() won't work as-is. How do we select the desired function inside a class?

    • @imranajabeen1322
      @imranajabeen1322 2 ปีที่แล้ว

      Did you find the solution? If you did kindly let me know.

    • @romeubeatotech
      @romeubeatotech 2 ปีที่แล้ว

      @@imranajabeen1322 not really

    • @k-r6465
      @k-r6465 ปีที่แล้ว

      in this case better to use electron or ionic

    • @iamtsp
      @iamtsp ปีที่แล้ว

      Do some string splitting based on regular expressions and then run load string for each split part.

    • @romeubeatotech
      @romeubeatotech ปีที่แล้ว

      @@iamtsp Good idea! thank you

  • @preadsy6912
    @preadsy6912 2 ปีที่แล้ว +1

    Thanks a lot man!! I had learned javascript recently and really appreciate your efforts!! This is the perfect video to understand the case of using js in flutter!! You deserve more subs buddy!!!! And also you got a new SUB!!!!

  • @Pepelui2460
    @Pepelui2460 2 ปีที่แล้ว +1

    flutter_js cannot be executed in an Isolation. How does this library run in isolation? This library also has problems on Samsung, Sony, and other devices.

  • @abhishekranjan3267
    @abhishekranjan3267 2 ปีที่แล้ว

    Hi @Learn App Code , You have any idea of package which works for all three web,ios and android ?

  • @cbeeapps2106
    @cbeeapps2106 3 ปีที่แล้ว +1

    I'm trying to follow your example using my own JS lib,
    but getting ERROR: undefined is not an object (evaluating 'global.window.define') on iOS,
    TypeError: cannot read property 'define' of undefined on Android.
    Any suggestions would be appreciated.

  • @rusiraliyanage6643
    @rusiraliyanage6643 2 ปีที่แล้ว

    I am getting the following error - type QuickJsRuntime2 is not a subtype of JavascriptCoreRuntime

  • @officialtrapremix
    @officialtrapremix 3 ปีที่แล้ว +1

    can you give me the source code
    of this app

  • @ujjwalyadav920
    @ujjwalyadav920 3 ปีที่แล้ว

    Nicely explained, thank you

  • @muharremacikgoz7222
    @muharremacikgoz7222 3 ปีที่แล้ว +1

    What if we have a js file which has 100 functions in it. When I use it like the way you show I get an error like ReferenceError: 'functionName' is not defined, what did I do wrong or how should I do that, thanks.

  • @moustafamando388
    @moustafamando388 3 ปีที่แล้ว

    Can I use turf js with flutter

  • @vijayabalajib1350
    @vijayabalajib1350 3 ปีที่แล้ว +1

    us? I believe its 'use'

  • @alisafodorov610
    @alisafodorov610 3 ปีที่แล้ว

    hey, I tried to integrate JS lib into my flutter app,
    but getting `TypeError: cannot read property 'define' of undefined`
    for the following line in the JS bundle `if (typeof global.window.define == 'function' && global.window.define.amd) {`
    Any ideas what's wrong?
    Very same JS bundle works fine for me for the native android app.

  • @k-r6465
    @k-r6465 ปีที่แล้ว

    not easy to use js in flutter

  • @devrub623
    @devrub623 3 ปีที่แล้ว

    Flutter is even worst, lol