Skip to content

[flutter_svg] Adding an error widget #158612

@stuartmorgan-g

Description

@stuartmorgan-g

Imported from dnfield/flutter_svg#250

Original report by @PoloLacoste on Nov 15, 2019

Hi !
I think it could be interesting to include an error widget when an error happens. For example a network connection error or a parse error.

Like the example below:

final String assetName = "myAsset.svg";
SvgPicture.asset(
	assetName,
	errorBuilder: (context, error){
		return MyErrorWidget();
	}
)

The error variable, in the error builder, could be an exception or a message.


Comment by @dnfield on Jan 19, 2020
I'd be happy to review a PR that does this.


Comment by @PoloLacoste on Jan 19, 2020
#277 Here it is !

Metadata

Metadata

Assignees

No one assigned

    Labels

    p: flutter_svgThe Flutter SVG drawing packagespackageflutter/packages repository. See also p: labels.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions