andoriyaprashant / andoriyaprashant/OpSo
fix: correct fallback asset rendering in LinuxFoundationWidget
- 主要语言
- Dart
- 星标
- 53
- 派生
- 108
- PR 合并指标
- 30 天内没有已合并 PR
描述
### Description
In `lib/widgets/linux_foundation_widget.dart`, if the `modal.imageUrl` is empty, the widget attempts to render a fallback asset:
```dart
modal.imageUrl == ""
? SvgPicture.asset(
'assets/logo.png',
fit: BoxFit.fitWidth,
height: 60,
)
```
There are two bugs here:
1. There is no file named `assets/logo.png` in the repository. The correct fallback asset should likely be `assets/linux_foundation_logo.png`.
2. The fallback asset is a PNG file, but it is being loaded using `SvgPicture.asset`. This will fail/crash at runtime because the SVG parser cannot parse PNG data.
### Solution
Replace `SvgPicture.asset('assets/logo.png')` with `Image.asset('assets/linux_foundation_logo.png')` for correct PNG asset rendering.
贡献指南
评估
这个 Issue 还没有评估数据。