Skip to content

Commit

Permalink
Remove some unneeded ClipRect widgets
Browse files Browse the repository at this point in the history
Stack clips internally if it has visual overflow and Image never draws outside
its bounds.
  • Loading branch information
abarth committed Mar 3, 2017
1 parent baaa2e6 commit 63e907d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,7 @@ class _GridPhotoViewerState extends State<GridPhotoViewer> with SingleTickerProv
transform: new Matrix4.identity()
..translate(_offset.dx, _offset.dy)
..scale(_scale),
child: new ClipRect(
child: new Image.asset(config.photo.assetName, fit: ImageFit.cover),
),
child: new Image.asset(config.photo.assetName, fit: ImageFit.cover),
),
);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/flutter/lib/src/material/flexible_space_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ class _FlexibleSpaceBarState extends State<FlexibleSpaceBar> {
}
}

return new ClipRect(child: new Stack(children: children));
return new Stack(children: children);
}
}

Expand Down

0 comments on commit 63e907d

Please sign in to comment.