在运行Flutter Web时如何指定端口号 [英] How to specify a port number while running flutter web
本文介绍了在运行Flutter Web时如何指定端口号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否有任何方法可以始终在相同的指定端口号上启动具有Headless-Server目标的Flutter Web?
Is there any way to start Flutter web, with a Headless-Server target, always on the same specified port number ?
今天,使用以下命令运行Web应用程序:
Today, running the web application with:
flutter run -d headless-server
提供一个随机端口号.
推荐答案
我在flutter_tools源代码中找到了答案:
I found the answer inside the flutter_tools source code:
flutter run -d headless-server --web-port=1234
这篇关于在运行Flutter Web时如何指定端口号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文