Unverified Commit 3156c288 authored by Michael Goderbauer's avatar Michael Goderbauer Committed by GitHub

Improve semantics for Drawer-Demo (#19911)

parent 82415e64
...@@ -201,29 +201,34 @@ class _DrawerDemoState extends State<DrawerDemo> with TickerProviderStateMixin { ...@@ -201,29 +201,34 @@ class _DrawerDemoState extends State<DrawerDemo> with TickerProviderStateMixin {
onTap: () { onTap: () {
_scaffoldKey.currentState.openDrawer(); _scaffoldKey.currentState.openDrawer();
}, },
child: new Column( child: new Semantics(
mainAxisSize: MainAxisSize.min, button: true,
children: <Widget>[ label: 'Open drawer',
new Container( excludeSemantics: true,
width: 100.0, child: new Column(
height: 100.0, mainAxisSize: MainAxisSize.min,
decoration: const BoxDecoration( children: <Widget>[
shape: BoxShape.circle, new Container(
image: const DecorationImage( width: 100.0,
image: const AssetImage( height: 100.0,
_kAsset0, decoration: const BoxDecoration(
package: _kGalleryAssetsPackage, shape: BoxShape.circle,
image: const DecorationImage(
image: const AssetImage(
_kAsset0,
package: _kGalleryAssetsPackage,
),
), ),
), ),
), ),
), new Padding(
new Padding( padding: const EdgeInsets.only(top: 8.0),
padding: const EdgeInsets.only(top: 8.0), child: new Text('Tap here to open the drawer',
child: new Text('Tap here to open the drawer', style: Theme.of(context).textTheme.subhead,
style: Theme.of(context).textTheme.subhead, ),
), ),
), ],
], ),
), ),
), ),
), ),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment