flutter 添加依赖的方式

添加仓库源

FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
PUB_HOSTED_URL=https://pub.flutter-io.cn

配置文件

  • pubspec.yaml
dependencies:
  flutter:
    sdk: flutter
  english_words: ^4.0.0



  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^1.0.2
  path_provider: ^2.0.2
  dio: ^5.3.3

命令行

flutter pub add  dio 
posted @ 2023-10-30 17:51  vx_guanchaoguo0  阅读(75)  评论(0编辑  收藏  举报