flutter安装第三方库也是超级方便直接在pubspec.yaml文件的dependencies节点下添加自己想要的第三方库例如:
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: ^0.1.2
carousel_slider: ^0.0.6
cached_network_image: ^0.4.1+1
transparent_image: ^0.1.0
flutter加载图片资源将flutter:节点下的assets的注释打开由于flutter采用yaml格式的配置必须想要遵循yaml的规范切记,本人踩过一次坑,找了好久才发现问题,
assets:
- images/chat.png
- images/chat_act.png
- images/discovery.png
- images/discovery_act.png
- images/wallet.png
- images/wallet_act.png
- images/bottom_line.png
-前面有两个空格