flutter - 颤振不加载资产
问题描述
我有一个颤动的问题,下面的资产没有显示在小部件内,它告诉我无法加载资产我该如何解决这个问题?
飞镖代码:
final cookingEvent = Event(
imagePath: "assets/event_images/granite_cooking_class.jpeg",
title: "Basket",
description: "",
location: "Ferrara(FE)",
duration: "1ms",
punchLine1: "Partecipa!",
punchLine2: "nuova partita di calcio",categoryIds: [0, 2],
galleryImages: ["assets/event_images/cooking_1.jpeg", "assets/event_images/cooking_2.jpeg", "assets/event_images/cooking_3.jpeg"]);
颤振异常:
r: "assets/event_images/5_km_downtown_run.jpeg", scale: 1.0)
flutter: ════════════════════════════════════════════════════════════════════════════════════════════════════
flutter: Another exception was thrown: Unable to load asset: assets/event_images/granite_cooking_class.jpeg
flutter: Another exception was thrown: Unable to load asset: assets/event_images/music_concert.jpeg
flutter: Another exception was thrown: Unable to load asset: assets/event_images/golf_competition.jpeg
发布规范.yaml:
assets:
- assets/guest_images/
- assets/event_images/
- assets/fonts/
fonts:
- family: Montserrat
fonts:
weight: 700
解决方案
推荐阅读
- python - 如何在 MAC OS 中将 python 2.7 与最新的 openssl 版本链接?
- google-sheets - 让它显示一个唯一的单元格范围,具体取决于哪个单元格为 TRUE
- python-3.x - pandas 高级逗号分割
- regex - Excel VBA - Regex.Escape 方法
- linux - 使用 noxsave 禁用 avx 指令
- reactjs - 反应本机导航打开从标题按钮绘制
- javascript - 使用枚举进行条件渲染时反应渲染不可见的组件
- angular - Visual Studio 的默认角度项目模板失败,第一次运行时未处理异常
- spring - Spring Mongo:存储库不按顺序返回日期
- c++ - 临时对象的 Clang 6 中的模板参数推导被破坏