From iOS To Flutter(2. CocoaPod = ?)
文章目录
前言:
在这里目的是记录学习Flutter的过程,上班比较忙碌,主要是面向百度学习。
pubspec.yaml
iOS中,可以使用CocoaPod管理第三方库,Flutter的第三方同样有地方管理。
ps:同事叫他插件。
pubspec.yaml中
dependencies:
flutter:
sdk: flutter
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.2cupertino_icons: 库的名字
^1.0.2: 版本
iOS中,第三方源码储存在Github、各种仓库中,
而Flutter根据目前自学发现也存在这样的网站。
比如:pub.flutter-io.cn
为了后续的学习,我在这里使用了
dependencies:
flutter:
sdk: flutter
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.2
http: ^0.13.4
easy_loading: ^0.0.4保存就会像 CocoaPod pod install 一样
import及使用
参照第三方的主页Readme,不做详论。
注意点
1、pubspec.yaml中需要注意格式,即先头空格的缩进。
评论
登录后参与技术讨论,分享你的经验与见解。
登录 / 注册暂无评论