@@ -72,9 +72,7 @@ void testMain() {
7272 expect (slices.length, 2 );
7373 expect (slices[0 ], pictureSliceWithRect (pictureRect));
7474 expect (slices[1 ], platformViewSliceWithViews (< PlatformView > [
75- PlatformView (1 , platformViewRect.size, PlatformViewStyling (
76- position: PlatformViewPosition .offset (platformViewRect.topLeft)
77- ))
75+ PlatformView (1 , platformViewRect, const PlatformViewStyling ())
7876 ]));
7977 });
8078
@@ -95,9 +93,7 @@ void testMain() {
9593 final List <LayerSlice > slices = scene.rootLayer.slices;
9694 expect (slices.length, 2 );
9795 expect (slices[0 ], platformViewSliceWithViews (< PlatformView > [
98- PlatformView (1 , platformViewRect.size, PlatformViewStyling (
99- position: PlatformViewPosition .offset (platformViewRect.topLeft)
100- ))
96+ PlatformView (1 , platformViewRect, const PlatformViewStyling ())
10197 ]));
10298 expect (slices[1 ], pictureSliceWithRect (pictureRect));
10399 });
@@ -122,9 +118,7 @@ void testMain() {
122118 expect (slices.length, 3 );
123119 expect (slices[0 ], pictureSliceWithRect (pictureRect1));
124120 expect (slices[1 ], platformViewSliceWithViews (< PlatformView > [
125- PlatformView (1 , platformViewRect.size, PlatformViewStyling (
126- position: PlatformViewPosition .offset (platformViewRect.topLeft)
127- ))
121+ PlatformView (1 , platformViewRect, const PlatformViewStyling ())
128122 ]));
129123 expect (slices[2 ], pictureSliceWithRect (pictureRect2));
130124 });
@@ -153,9 +147,7 @@ void testMain() {
153147 expect (slices.length, 2 );
154148 expect (slices[0 ], pictureSliceWithRect (const ui.Rect .fromLTRB (50 , 50 , 200 , 200 )));
155149 expect (slices[1 ], platformViewSliceWithViews (< PlatformView > [
156- PlatformView (1 , platformViewRect.size, PlatformViewStyling (
157- position: PlatformViewPosition .offset (platformViewRect.topLeft)
158- ))
150+ PlatformView (1 , platformViewRect, const PlatformViewStyling ())
159151 ]));
160152 });
161153
@@ -181,7 +173,7 @@ void testMain() {
181173 expect (slices.length, 3 );
182174 expect (slices[0 ], pictureSliceWithRect (pictureRect1));
183175 expect (slices[1 ], platformViewSliceWithViews (< PlatformView > [
184- PlatformView (1 , platformViewRect.size , const PlatformViewStyling (position: PlatformViewPosition .offset (ui.Offset (150 , 150 ))))
176+ PlatformView (1 , platformViewRect, const PlatformViewStyling (position: PlatformViewPosition .offset (ui.Offset (150 , 150 ))))
185177 ]));
186178 expect (slices[2 ], pictureSliceWithRect (const ui.Rect .fromLTRB (200 , 200 , 300 , 300 )));
187179 });
@@ -247,8 +239,7 @@ class PlatformViewSliceMatcher extends Matcher {
247239 print ('viewID mismatch' );
248240 return false ;
249241 }
250- if (expectedView.size != actualView.size) {
251- print ('size mismatch' );
242+ if (expectedView.bounds != actualView.bounds) {
252243 return false ;
253244 }
254245 if (expectedView.styling != actualView.styling) {
0 commit comments