Improve semantics for Drawer-Demo (#19911)

This commit is contained in:
Michael Goderbauer
2018-07-30 09:28:24 -07:00
committed by GitHub
parent 82415e6400
commit 3156c28882

View File

@@ -201,29 +201,34 @@ class _DrawerDemoState extends State<DrawerDemo> with TickerProviderStateMixin {
onTap: () {
_scaffoldKey.currentState.openDrawer();
},
child: new Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
new Container(
width: 100.0,
height: 100.0,
decoration: const BoxDecoration(
shape: BoxShape.circle,
image: const DecorationImage(
image: const AssetImage(
_kAsset0,
package: _kGalleryAssetsPackage,
child: new Semantics(
button: true,
label: 'Open drawer',
excludeSemantics: true,
child: new Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
new Container(
width: 100.0,
height: 100.0,
decoration: const BoxDecoration(
shape: BoxShape.circle,
image: const DecorationImage(
image: const AssetImage(
_kAsset0,
package: _kGalleryAssetsPackage,
),
),
),
),
),
new Padding(
padding: const EdgeInsets.only(top: 8.0),
child: new Text('Tap here to open the drawer',
style: Theme.of(context).textTheme.subhead,
new Padding(
padding: const EdgeInsets.only(top: 8.0),
child: new Text('Tap here to open the drawer',
style: Theme.of(context).textTheme.subhead,
),
),
),
],
],
),
),
),
),