首页 > 其他分享 >Flutter web的创建

Flutter web的创建

时间:2024-01-10 16:36:10浏览次数:38  
标签:web Web Chrome 创建 support Flutter flutter

This page covers the following steps for getting started with web support:
本页介绍了开始使用 Web 支持的以下步骤:

  • Configure the 

flutter

  •  tool for web support.
    配置 'flutter' 工具以获得 Web 支持。
  • Create a new project with web support.
    创建一个具有 Web 支持的新项目。
  • Run a new project with web support.
    在 Web 支持下运行新项目。
  • Build an app with web support.
    构建具有 Web 支持的应用。
  • Add web support to an existing project.
    将 Web 支持添加到现有项目。

Requirements要求

To create a Flutter app with web support, you need the following software:
要创建一个支持 Web 的 Flutter 应用, 您需要以下软件:

  • Flutter SDK. See the Flutter SDK installation instructions.
    Flutter SDK。请参阅 Flutter SDK 安装说明。
  • Chrome; debugging a web app requires the Chrome browser.
    铬;调试 Web 应用需要 Chrome 浏览器。
  • Optional: An IDE that supports Flutter. You can install Visual Studio CodeAndroid StudioIntelliJ IDEA. Also install the Flutter and Dart plugins to enable language support and tools for refactoring, running, debugging, and reloading your web app within an editor. See setting up an editor for more details.
    可选:支持 Flutter 的 IDE。 可以安装 Visual Studio CodeAndroid StudioIntelliJ IDEA。 同时安装 Flutter 和 Dart 插件 启用语言支持和重构工具, 运行、调试和重新加载 Web 应用 在编辑器中。请参阅设置编辑器 了解更多详情。

For more information, see the web FAQ有关详细信息,请参阅 Web 常见问题解答.

Create a new project with web support
创建具有 Web 支持的新项目

You can use the following steps to create a new project with web support.
您可以使用以下步骤 以创建具有 Web 支持的新项目。

Set up建立

Run the following commands to use the latest version of the Flutter SDK:
执行以下命令,使用最新版本的 Flutter SDK。

content_copy

$ flutter channel stable
$ flutter upgrade

report_problem Warning: Running flutter channel stable replaces your current version of Flutter with the stable version and can take time if your connection is slow. After this, running flutter upgrade upgrades your install to the latest stable. Returning to another channel (beta or master) requires calling flutter channel <channel> explicitly.

report_problemWarning: 运行 'flutter channel stable' 会替换你当前版本的 Flutter 使用稳定版本,如果您的连接速度较慢,可能需要一些时间。 在此之后,运行 'flutter upgrade' 会将你的安装升级到最新版本 “稳定”。 返回到另一个频道(测试版或主版)需要调用 'flutter channel<channel>' 显式。If Chrome is installed, the flutter devices command outputs a Chrome device that opens the Chrome browser with your app running, and a Web Server that provides the URL serving the app.

如果安装了 Chrome, 'flutter devices' 命令输出一个 'Chrome' 设备 打开正在运行应用的 Chrome 浏览器, 以及提供为应用提供服务的 URL 的“Web 服务器”。

content_copy

$ flutter devices
1 connected device:

Chrome (web) • chrome • web-javascript • Google Chrome 88.0.4324.150

In your IDE, you should see Chrome (web) in the device pulldown.
在 IDE 中,您应该会在设备下拉列表中看到 Chrome (Web)。

标签:web,Web,Chrome,创建,support,Flutter,flutter
From: https://blog.51cto.com/u_16392501/9182005

相关文章

  • 创建一个vue项目全过程
    1.安装node环境,cmd检查node是否安装成功命令:node-v2.安装vue.js,命令:npminstall-gvue(默认安装的是vue3)3.安装webpack模块,命令:npminstallwebpack-g4.安装webpack脚手架,命令:npminstall--globalwebpack-cli5.全局安装vue-cli,命令:npminstall-globalvue-cli(安装的是vu......
  • netcore webpi 通过signalr 给vue项目推送消息
     最近项目上需要做个服务给前端推消息,首先就想到了signalr,关于signalr详情可以参考微软官方文档(ASP.NETCoreSignalR概述|MicrosoftLearn),微软现在也有使用教程(ASP.NETCoreSignalR入门|MicrosoftLearn)微软教程是通过使用库管理器(LibMan)从unpkg 获取客户端库,如......
  • .NET如何创建Dockerfile文件构建镜像?
    创建一个WebApi项目,并且创建一个Dockerfile空文件,添加以下代码,7.0代表的你项目使用的SDK的版本,构建的时候也需要选择好指定的镜像tagFROMmcr.microsoft.com/dotnet/aspnet:7.0ASbaseWORKDIR/appEXPOSE80EXPOSE443FROMmcr.microsoft.com/dotnet/sdk:7.0ASbuildARGB......
  • 基于Web的智慧充电站可视化大屏运维平台
    前言充电基础设施为电动汽车提供充换电服务,是重要的交通能源融合类基础设施。近年来,随着新能源汽车产业快速发展,我国充电基础设施持续增长,已建成世界上数量最多、服务范围最广、品种类型最全的充电基础设施体系。着眼未来新能源汽车特别是电动汽车快速增长的趋势,充电基础设施仍存在......
  • 【AD】Powershell创建林
    欢迎购买我的课程:https://edu.51cto.com/course/35495.html适合人群:适合对域控和Powershell有一定基础的运维。帮助他们更快部署新林新域的时间,减少人工操作,提升效率。你将会学到:利用Powershell一键创建林、域内的所有DC和卸载所有DC课程简介:通过强大的Powershell,一键创建林、域......
  • 创建单机 PolarDB-X 集群
    https://doc.polardbx.com/quickstart/topics/quickstart-pxd-cluster.html#安装dockercurl-fsSLhttps://get.docker.com-oget-docker.shshget-docker.sh#配置普通用户访问dockersudogroupadddockersudogpasswd-a${USER}dockernewgrpdocker#安装pxdpip......
  • SpringBoot WebSocket 样例
    SpringBootWebSocket样例pom.xml依赖配置<dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-websocket</artifactId></dependency><dependency><groupId>javax.webso......
  • 国际Web标准在跨平台开发和移动优化方面的影响
    Laravel是一个流行的PHP框架,它具有出色的可测试性,可以帮助开发人员在更短的时间内编写可靠的代码。但是,即使使用了这个框架,也可能会出现测试覆盖率较低的情况。测试覆盖率是指代码中已由测试案例覆盖的部分比例。测试覆盖率越高,代码质量越高。在本文中,我们将分享几种技巧,帮助您提......
  • 用 Socket.D 替代原生 WebSocket 做前端开发
    socket.d.js是基于websocket包装的socket.d协议的实现。就是用ws传输数据,但功能更强大。功能原生websocketsocket.d说明listen有有监听消息send有有发消息sendAndRequest无有发消息并接收一个响应(类似于http)sendAndSubscribe无有发消息......
  • C# 调用WebService 笔记
    最近开发工作涉及到一些关于webService调用的问题,因为太久没有做过这部分,踩了一点坑,做个笔记记录一下,避免下次踩坑。说明C#调用webService基本有两种方法,一种是静态调用,也就是添加到服务引用,还有一种方式是动态引用,动态引用的主要思路是通过url将DLL下载到本地,然后进行调用,这里......