From 84dbef398226d44abb1e769f305033e5fc677d05 Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Fri, 27 Apr 2018 13:24:21 -0700 Subject: [PATCH] add route semantics to backdrop widget (#16981) --- .../flutter_gallery/lib/gallery/backdrop.dart | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/examples/flutter_gallery/lib/gallery/backdrop.dart b/examples/flutter_gallery/lib/gallery/backdrop.dart index 8de2d9b1cd..dd68c81778 100644 --- a/examples/flutter_gallery/lib/gallery/backdrop.dart +++ b/examples/flutter_gallery/lib/gallery/backdrop.dart @@ -107,14 +107,22 @@ class _CrossFadeTransition extends AnimatedWidget { ignoring: opacity1 < 1.0, child: new Opacity( opacity: opacity1, - child: child1, + child: new Semantics( + scopesRoute: true, + explicitChildNodes: true, + child: child1, + ), ), ), new IgnorePointer( ignoring: opacity2 <1.0, child: new Opacity( opacity: opacity2, - child: child0, + child: new Semantics( + scopesRoute: true, + explicitChildNodes: true, + child: child0, + ), ), ), ], @@ -261,8 +269,8 @@ class _BackdropState extends State with SingleTickerProviderStateMixin title: new _CrossFadeTransition( progress: _controller, alignment: AlignmentDirectional.centerStart, - child0: widget.frontTitle, - child1: widget.backTitle, + child0: new Semantics(namesRoute: true, child: widget.frontTitle), + child1: new Semantics(namesRoute: true, child: widget.backTitle), ), trailing: new IconButton( onPressed: _toggleFrontLayer,