Put the backdrop demo controls on the right (#16902)

This commit is contained in:
Hans Muller 2018-04-23 17:19:39 -07:00 committed by GitHub
parent b1330eff5f
commit cdb82fce92
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 22 deletions

View File

@ -342,14 +342,7 @@ class _BackdropDemoState extends State<BackdropDemo> with SingleTickerProviderSt
}, },
), ),
); );
}).toList() }).toList();
..add(const SizedBox(height: 8.0))
..add(
new Align(
alignment: AlignmentDirectional.centerStart,
child: new BackButton(color: Colors.white.withOpacity(0.5))
),
);
return new Container( return new Container(
key: _backdropKey, key: _backdropKey,
@ -388,16 +381,18 @@ class _BackdropDemoState extends State<BackdropDemo> with SingleTickerProviderSt
return new Scaffold( return new Scaffold(
appBar: new AppBar( appBar: new AppBar(
elevation: 0.0, elevation: 0.0,
leading: new IconButton(
onPressed: _toggleBackdropPanelVisibility,
icon: new AnimatedIcon(
icon: AnimatedIcons.close_menu,
progress: _controller.view,
),
),
title: new BackdropTitle( title: new BackdropTitle(
listenable: _controller.view, listenable: _controller.view,
), ),
actions: <Widget>[
new IconButton(
onPressed: _toggleBackdropPanelVisibility,
icon: new AnimatedIcon(
icon: AnimatedIcons.close_menu,
progress: _controller.view,
),
),
],
), ),
body: new LayoutBuilder( body: new LayoutBuilder(
builder: _buildStack, builder: _buildStack,

View File

@ -30,7 +30,6 @@ const List<String> _kUnsynchronizedDemos = const <String>[
// These demos can't be backed out of by tapping a button whose // These demos can't be backed out of by tapping a button whose
// tooltip is 'Back'. // tooltip is 'Back'.
const List<String> _kSkippedDemos = const <String>[ const List<String> _kSkippedDemos = const <String>[
'Backdrop',
'Pull to refresh', 'Pull to refresh',
]; ];

View File

@ -102,12 +102,6 @@ Future<Null> smokeDemo(WidgetTester tester, String routeName) async {
await tester.pump(); await tester.pump();
await tester.pump(const Duration(milliseconds: 400)); await tester.pump(const Duration(milliseconds: 400));
// This demo's back button isn't initially visible.
if (routeName == '/material/backdrop') {
await tester.tap(find.byTooltip('Tap to dismiss'));
await tester.pumpAndSettle();
}
// Go back // Go back
await tester.pageBack(); await tester.pageBack();
await tester.pumpAndSettle(); await tester.pumpAndSettle();