How to deploy a dart app as a html file or as a folder containing an html file that someone can run offline

Issue

Can I can distribute a dart application to a client as a folder or html file so it can be run by clicking the html file to run the app offline?

I can run my dart app that resides on my local 127.0.0.1 but not by clicking the html file in the web directory.

Thanks.

Solution

You need to make sure that the app was converted to Javascript before you deploy it. Dart itself cannot run on a random person’s computer. However, Dart converted to Javascript can. If you go to the Tools menu in Dart Editor there is an option for “Generate Javascript”.

Answered By – davecom

Answer Checked By – Jay B. (FlutterFixes Admin)

Leave a Reply

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