@@ -252,39 +252,41 @@ class _Heading extends StatelessWidget {
252252 Widget build (BuildContext context) {
253253 final Size screenSize = MediaQuery .of (context).size;
254254 final ShrineTheme theme = ShrineTheme .of (context);
255- return new SizedBox (
256- height: screenSize.width > screenSize.height
257- ? (screenSize.height - kToolbarHeight) * 0.85
258- : (screenSize.height - kToolbarHeight) * 0.70 ,
259- child: new Container (
260- decoration: new BoxDecoration (
261- color: theme.cardBackgroundColor,
262- border: new Border (bottom: new BorderSide (color: theme.dividerColor)),
263- ),
264- child: new CustomMultiChildLayout (
265- delegate: new _HeadingLayout (),
266- children: < Widget > [
267- new LayoutId (
268- id: _HeadingLayout .price,
269- child: new _FeaturePriceItem (product: product),
270- ),
271- new LayoutId (
272- id: _HeadingLayout .image,
273- child: new Image .asset (product.imageAsset, fit: BoxFit .cover),
274- ),
275- new LayoutId (
276- id: _HeadingLayout .title,
277- child: new Text (product.featureTitle, style: theme.featureTitleStyle),
278- ),
279- new LayoutId (
280- id: _HeadingLayout .description,
281- child: new Text (product.featureDescription, style: theme.featureStyle),
282- ),
283- new LayoutId (
284- id: _HeadingLayout .vendor,
285- child: new _VendorItem (vendor: product.vendor),
286- ),
287- ],
255+ return new MergeSemantics (
256+ child: new SizedBox (
257+ height: screenSize.width > screenSize.height
258+ ? (screenSize.height - kToolbarHeight) * 0.85
259+ : (screenSize.height - kToolbarHeight) * 0.70 ,
260+ child: new Container (
261+ decoration: new BoxDecoration (
262+ color: theme.cardBackgroundColor,
263+ border: new Border (bottom: new BorderSide (color: theme.dividerColor)),
264+ ),
265+ child: new CustomMultiChildLayout (
266+ delegate: new _HeadingLayout (),
267+ children: < Widget > [
268+ new LayoutId (
269+ id: _HeadingLayout .price,
270+ child: new _FeaturePriceItem (product: product),
271+ ),
272+ new LayoutId (
273+ id: _HeadingLayout .image,
274+ child: new Image .asset (product.imageAsset, fit: BoxFit .cover),
275+ ),
276+ new LayoutId (
277+ id: _HeadingLayout .title,
278+ child: new Text (product.featureTitle, style: theme.featureTitleStyle),
279+ ),
280+ new LayoutId (
281+ id: _HeadingLayout .description,
282+ child: new Text (product.featureDescription, style: theme.featureStyle),
283+ ),
284+ new LayoutId (
285+ id: _HeadingLayout .vendor,
286+ child: new _VendorItem (vendor: product.vendor),
287+ ),
288+ ],
289+ ),
288290 ),
289291 ),
290292 );
@@ -303,35 +305,37 @@ class _ProductItem extends StatelessWidget {
303305
304306 @override
305307 Widget build (BuildContext context) {
306- return new Card (
307- child: new Stack (
308- children: < Widget > [
309- new Column (
310- children: < Widget > [
311- new Align (
312- alignment: FractionalOffset .centerRight,
313- child: new _ProductPriceItem (product: product),
314- ),
315- new Container (
316- width: 144.0 ,
317- height: 144.0 ,
318- padding: const EdgeInsets .symmetric (horizontal: 8.0 ),
319- child: new Hero (
320- tag: product.tag,
321- child: new Image .asset (product.imageAsset, fit: BoxFit .contain),
308+ return new MergeSemantics (
309+ child: new Card (
310+ child: new Stack (
311+ children: < Widget > [
312+ new Column (
313+ children: < Widget > [
314+ new Align (
315+ alignment: FractionalOffset .centerRight,
316+ child: new _ProductPriceItem (product: product),
317+ ),
318+ new Container (
319+ width: 144.0 ,
320+ height: 144.0 ,
321+ padding: const EdgeInsets .symmetric (horizontal: 8.0 ),
322+ child: new Hero (
323+ tag: product.tag,
324+ child: new Image .asset (product.imageAsset, fit: BoxFit .contain),
325+ ),
322326 ),
327+ new Padding (
328+ padding: const EdgeInsets .symmetric (horizontal: 8.0 ),
329+ child: new _VendorItem (vendor: product.vendor),
323330 ),
324- new Padding (
325- padding: const EdgeInsets .symmetric (horizontal: 8.0 ),
326- child: new _VendorItem (vendor: product.vendor),
327- ),
328- ],
329- ),
330- new Material (
331- type: MaterialType .transparency,
332- child: new InkWell (onTap: onPressed),
333- ),
334- ],
331+ ],
332+ ),
333+ new Material (
334+ type: MaterialType .transparency,
335+ child: new InkWell (onTap: onPressed),
336+ ),
337+ ],
338+ ),
335339 ),
336340 );
337341 }
0 commit comments