Put the backdrop demo controls on the right (#16902)
This commit is contained in:
parent
b1330eff5f
commit
cdb82fce92
@ -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,
|
||||||
|
@ -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',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -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();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user