简体   繁体   English

pubspec.yaml 文件中 Flutter 资产中的包是什么?

[英]What is packages in Flutter assets inside pubspec.yaml file?

I'm using flutter gallery sample code, and found following in pubspec.yaml file.我正在使用颤振库示例代码,并在pubspec.yaml文件中找到以下内容。

flutter:
  assets:
    - packages/shrine_images/0-0.jpg

I tried to find out packages and 0-0.jpg file in the project but couldn't find.我试图找出项目中的packages0-0.jpg文件,但找不到。 Can anyone tell me what this package is all about and from where I am seeing images when running the app?谁能告诉我这个包的全部内容以及运行应用程序时我从哪里看到图像?

Actually they have added a package实际上他们已经添加了一个包

flutter_gallery_assets: 0.1.9+2 flutter_gallery_assets:0.1.9+2

Check it in pubspec.yaml dependencies, its a package so that you can use images from this package.在 pubspec.yaml 依赖项中检查它,它是一个包,以便您可以使用该包中的图像。 So the pictures are from that package and they are just mentioning the image path from that package.所以图片来自那个包,他们只是提到了那个包的图像路径。 Here is the package link they are usingclick here这是他们正在使用的包链接点击这里

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM