Unverified Commit 39142146 authored by Adam Barth's avatar Adam Barth Committed by GitHub

Fix analyzer warnings (#12840)

parent c608e666
......@@ -134,7 +134,7 @@ class DrawerController extends StatefulWidget {
GlobalKey key,
@required this.child,
@required this.alignment,
}) : assert(child != null),
}) : assert(child != null),
assert(alignment != null),
super(key: key);
......@@ -300,21 +300,25 @@ class DrawerControllerState extends State<DrawerController> with SingleTickerPro
final GlobalKey _gestureDetectorKey = new GlobalKey();
AlignmentDirectional get _drawerOuterAlignment {
assert(widget.alignment != null);
switch (widget.alignment) {
case DrawerAlignment.start:
return AlignmentDirectional.centerStart;
case DrawerAlignment.end:
return AlignmentDirectional.centerEnd;
}
return null;
}
AlignmentDirectional get _drawerInnerAlignment {
assert(widget.alignment != null);
switch (widget.alignment) {
case DrawerAlignment.start:
return AlignmentDirectional.centerEnd;
case DrawerAlignment.end:
return AlignmentDirectional.centerStart;
}
return null;
}
Widget _buildDrawer(BuildContext context) {
......
......@@ -630,7 +630,7 @@ void main() {
const String endDrawerLabel = 'I am the label on end side';
final SemanticsTester semantics = new SemanticsTester(tester);
await tester.pumpWidget(new MaterialApp(home: new Scaffold(
await tester.pumpWidget(new MaterialApp(home: const Scaffold(
body: const Text(bodyLabel),
drawer: const Drawer(child:const Text(drawerLabel)),
endDrawer: const Drawer(child:const Text(endDrawerLabel)),
......
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