Description
In lib/widgets/linux_foundation_widget.dart, if the modal.imageUrl is empty, the widget attempts to render a fallback asset:
modal.imageUrl == ""
? SvgPicture.asset(
'assets/logo.png',
fit: BoxFit.fitWidth,
height: 60,
)
There are two bugs here:
- There is no file named
assets/logo.png in the repository. The correct fallback asset should likely be assets/linux_foundation_logo.png.
- 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.
Description
In
lib/widgets/linux_foundation_widget.dart, if themodal.imageUrlis empty, the widget attempts to render a fallback asset:There are two bugs here:
assets/logo.pngin the repository. The correct fallback asset should likely beassets/linux_foundation_logo.png.SvgPicture.asset. This will fail/crash at runtime because the SVG parser cannot parse PNG data.Solution
Replace
SvgPicture.asset('assets/logo.png')withImage.asset('assets/linux_foundation_logo.png')for correct PNG asset rendering.