Skip to content

Commit

Permalink
use ErrorWidget on error
Browse files Browse the repository at this point in the history
  • Loading branch information
dnfield committed May 15, 2018
1 parent 3e1400e commit 3266755
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/vector_drawable.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ class VectorDrawableImage extends StatelessWidget {
return new FutureBuilder<DrawableRoot>(
future: future,
builder: (BuildContext context, AsyncSnapshot<DrawableRoot> snapShot) {
if (snapShot.hasData) {
if (snapShot.hasError) {
return new ErrorWidget(snapShot.error);
} else if (snapShot.hasData) {
final CustomPainter painter =
new VectorPainter(snapShot.data, clipToViewBox: clipToViewBox);
return new RepaintBoundary.wrap(
Expand Down

0 comments on commit 3266755

Please sign in to comment.