Skip to content

fix: correct fallback asset rendering in LinuxFoundationWidget #452

Description

@adityashirsatrao007

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:

  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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions