Make Layer.toImage() accept bounds rather than size (#17129)
It allows callers to account for things like shadows that paint outside the bounds of the widget. https://github.com/flutter/flutter/issues/16859
This commit is contained in:
@@ -1235,7 +1235,7 @@ class _MatchesGoldenFile extends AsyncMatcher {
|
||||
}
|
||||
assert(!renderObject.debugNeedsPaint);
|
||||
final OffsetLayer layer = renderObject.layer;
|
||||
final Future<ui.Image> imageFuture = layer.toImage(element.size);
|
||||
final Future<ui.Image> imageFuture = layer.toImage(renderObject.paintBounds);
|
||||
|
||||
final TestWidgetsFlutterBinding binding = TestWidgetsFlutterBinding.ensureInitialized();
|
||||
return binding.runAsync<String>(() async {
|
||||
|
||||
Reference in New Issue
Block a user