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

StackOverflow https://stackoverflow.com/questions/19260933

  •  30-06-2022
  •  | 
  •  

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.

有帮助吗?

解决方案

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".

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top