如何在抖动中使用来自第三方包装资产的图像?

时间:2020-06-29 21:00:24

标签: flutter dart

我正在pubspec.yaml中使用此软件包

dependencies:
  country_code_picker: ^1.4.0

这是仓库:https://github.com/imtoori/CountryCodePicker

我想使用flags/目录中的图像

要在Flutter中从Image.asset()使用它们,我需要做什么?

1 个答案:

答案 0 :(得分:1)

您应指定软件包:

Image.asset(
  'flags/ad.png',
  package: 'country_code_picker',
)