How to use a JS library and a JS function in a Flutter mobile app?

Issue

I want to use a JavaScript library in my mobile Flutter project. Here is the link for this library on github.

Library

How can I use this library and a function(aboutnumber()) from it in my project? How can I import this library to a project and how to access its function?

Solution

This is not possible on any platform other than the web, as described in the JS interop documentation.

On the Web, package:js can be used.

Answered By – hacker1024

Answer Checked By – Robin (FlutterFixes Admin)

Leave a Reply

Your email address will not be published. Required fields are marked *