首页 > 其他分享 >flutter:设置当前的channel并更新版本(从master切换到stable)

flutter:设置当前的channel并更新版本(从master切换到stable)

时间:2023-01-28 16:56:36浏览次数:61  
标签:liuhongdi Pro master stable liuhongdideMacBook flutter channel

一,查看当前flutter和dart的版本:

说明:我们当前的channel是master,所以可以看到flutter和dart版本均为pre或dev版本:
liuhongdi@liuhongdideMacBook-Pro ~ % flutter --version
Flutter 3.7.0-27.0.pre.25 • channel master • https://github.com/flutter/flutter.git
Framework • revision c9affdba9d (7 hours ago) • 2023-01-25 21:25:02 -0800
Engine • revision 8f1e5dc1b1
Tools • Dart 3.0.0 (build 3.0.0-157.0.dev) • DevTools 2.20.1
liuhongdi@liuhongdideMacBook-Pro ~ % dart --version
Dart SDK version: 3.0.0-157.0.dev (dev) (Mon Jan 23 20:06:50 2023 -0800) on “macos_x64"

说明:刘宏缔的架构森林是一个专注架构的博客,地址:https://www.cnblogs.com/architectforest

         对应的源码可以访问这里获取: https://github.com/liuhongdi/
         或: https://gitee.com/liuhongdi

说明:作者:刘宏缔 邮箱: [email protected]

二,查看flutter当前的channel

liuhongdi@liuhongdideMacBook-Pro ~ % flutter channel
Flutter channels:
* master
  main
  beta
  stable

可以看到当前的channel是master,我们把它切换为stable,

这样可以保障库的稳定性

三,设置当前channel,切换到stable

liuhongdi@liuhongdideMacBook-Pro ~ % flutter channel stable
Switching to flutter channel 'stable'...
git: Switched to a new branch 'stable'
git: Branch 'stable' set up to track remote branch 'stable' from 'origin'.
Successfully switched to flutter channel 'stable'.
To ensure that you're on the latest build from this channel, run 'flutter upgrade’

四,再次使用flutter channel命令时,会开始下载

1,查看当前的channel
liuhongdi@liuhongdideMacBook-Pro ~ % flutter channel      
Downloading Darwin x64 Dart SDK from Flutter engine b24591ed328a2d4ce6505819e2f5898a78132f7f…
…
Flutter assets will be downloaded from https://storage.flutter-io.cn. Make sure you trust this source!
Downloading package sky_engine...                                1,206ms
Downloading flutter_patched_sdk tools...                         1,096ms
Downloading flutter_patched_sdk_product tools...                 1,232ms
Downloading darwin-x64 tools...                                     8.5s
Downloading darwin-x64/font-subset tools...                        618ms
Flutter channels:
  master
  main
  beta
* stable
再次更新flutter
liuhongdi@liuhongdideMacBook-Pro ~ % flutter upgrade
Flutter is already up to date on channel stable
Flutter 3.7.0 • channel stable • https://github.com/flutter/flutter.git
Framework • revision b06b8b2710 (3 days ago) • 2023-01-23 16:55:55 -0800
Engine • revision b24591ed32
Tools • Dart 2.19.0 • DevTools 2.20.1

可以看到flutter并未进行下载操作,因为执行flutter channel时就已做了更新,

更新是为把版本切换到stable channel下的新版本

五,查看切换channel后的版本

liuhongdi@liuhongdideMacBook-Pro ~ % flutter --version
Flutter 3.7.0 • channel stable • https://github.com/flutter/flutter.git
Framework • revision b06b8b2710 (3 days ago) • 2023-01-23 16:55:55 -0800
Engine • revision b24591ed32
Tools • Dart 2.19.0 • DevTools 2.20.1
liuhongdi@liuhongdideMacBook-Pro ~ % dart --version
Dart SDK version: 2.19.0 (stable) (Mon Jan 23 11:29:09 2023 -0800) on "macos_x64"

可以看到在stable channel,不管是dart还是flutter都已切换至稳定的版本,不再是pre或dev版本

标签:liuhongdi,Pro,master,stable,liuhongdideMacBook,flutter,channel
From: https://www.cnblogs.com/architectforest/p/17070837.html

相关文章

  • Flutter实战-第二版
    第二版序本书是Flutter中国开源项目 (opensnewwindow)发起人杜文(网名wendux)创作的一本系统介绍Flutter技术的中文书籍,旨在帮助开发者系统地、循序渐进地了解Flutter......
  • MAC M1芯片架构问题 Flutter 项目里用的flutter_blue库比较老,导致报该错误
    1. flutter_blue里面修改配置https://www.jianshu.com/p/b450a5589b33 不要直接打开Flutter项目,用AndroidStudio打开项目里的android目录,  由于我的项目......
  • Mac搭建Flutter环境
    1.终端输入命令:vi.bash_profile2.复制:exportPATH="$PATH:/Users/dy/Desktop/flutter/bin:$PATH"exportPUB_HOSTED_URL=https://pub.flutter-io.cnexportFLUTTER_S......
  • macOS 上安装和配置 Flutter 开发环境
    本文基于此:Flutter中文网一、安装和运行Flutter的系统环境要求想要安装并运行Flutter,你的开发环境需要最低满足以下要求:操作系统:macOS磁盘空间:2.8GB(不包括IDE/......
  • RedisCluster集群模式下master宕机主从切换期间Redis command timed out的问题
     一、异常场景如下表所示,redis集群6个节点分别部署在3台机器上,每台机器分布一个主节点和一个从节点机器redis主节点端口redis从节点端口主机170017004主......
  • 深入理解flutter中的state
    flutter中如果使用widget,那么无可避免的就要接触到StatelessWidget和StatefulWidget这两样东西,这两样东西表示什么呢?首先我们需要明白flutter中的编程范式,flutter......
  • Flutter监听安卓系统字体变化,监听安卓系统深色模式切换
    Flutter通过强大的MediaQuery控件做到监听前设备的信息及其设备信息的动态变化参考:Flutter强大的MediaQuery控件Flutter小技巧之MediaQuery和build优化你不知道的......
  • Flutter中渲染过程
    flutter三个部分首先在App开发的时候,我们就会关注一个问题:如何结构化地组织视图数据,提供给渲染引擎,最终完成界面显示。flutter对视图树的概念进行一些扩展,它将......
  • Flutter 耗时监控 | 路由名为空原因分析
    前言最近群里遇到获取Route名为空的问题,当时没在意。。。直到自己在监控页面启动耗时,需要确定当前页面是哪个从而方便标记它加载的耗时时,遇到同样route.settings.name......
  • Flutter框架渲染流程与使用
    Flutter简述Flutter是一个UISDK,可以进行移动端(iOS,Android),Web端,桌面,它是一个跨平台解决方法。Flutter的特点:美观,快速,高效,开放。美观:Flutter内置了美丽的MaterialDes......