Flutter教程02-getCli安装

从0开始学习跨平台开发APP赚钱。

GetX介绍

GetX™ 框架的安装

flutter pub global activate get_cli

配置环境变量

这里需要改成你flutter安装的地址里面的.pub-cache/bin

export PATH="$PATH":"$HOME/development/flutter/.pub-cache/bin"

source .bash_profile

验证安装是否成功

get --version

输出如下

The [--version] is not necessary

░██████╗░███████╗████████╗   ░█████╗░██╗░░░░░░██╗
██╔════╝░██╔════╝╚══██╔══╝   ██╔══██╗██║░░░░░░██║
██║░░██╗░█████╗░░░░░██║░░░   ██║░░╚═╝██║░░░░░░██║
██║░░╚██╗██╔══╝░░░░░██║░░░   ██║░░██╗██║░░░░░░██║
╚██████╔╝███████╗░░░██║░░░   ╚█████╔╝███████╗ ██║
░╚═════╝░╚══════╝░░░╚═╝░░░   ░╚════╝░╚══════╝ ╚═╝

Version: 1.8.1

Time: 802 Milliseconds
Written on October 11, 2022