Fix analyzer warnings (#12840)
This commit is contained in:
parent
c608e666ad
commit
3914214641
@ -134,7 +134,7 @@ class DrawerController extends StatefulWidget {
|
|||||||
GlobalKey key,
|
GlobalKey key,
|
||||||
@required this.child,
|
@required this.child,
|
||||||
@required this.alignment,
|
@required this.alignment,
|
||||||
}) : assert(child != null),
|
}) : assert(child != null),
|
||||||
assert(alignment != null),
|
assert(alignment != null),
|
||||||
super(key: key);
|
super(key: key);
|
||||||
|
|
||||||
@ -300,21 +300,25 @@ class DrawerControllerState extends State<DrawerController> with SingleTickerPro
|
|||||||
final GlobalKey _gestureDetectorKey = new GlobalKey();
|
final GlobalKey _gestureDetectorKey = new GlobalKey();
|
||||||
|
|
||||||
AlignmentDirectional get _drawerOuterAlignment {
|
AlignmentDirectional get _drawerOuterAlignment {
|
||||||
|
assert(widget.alignment != null);
|
||||||
switch (widget.alignment) {
|
switch (widget.alignment) {
|
||||||
case DrawerAlignment.start:
|
case DrawerAlignment.start:
|
||||||
return AlignmentDirectional.centerStart;
|
return AlignmentDirectional.centerStart;
|
||||||
case DrawerAlignment.end:
|
case DrawerAlignment.end:
|
||||||
return AlignmentDirectional.centerEnd;
|
return AlignmentDirectional.centerEnd;
|
||||||
}
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
AlignmentDirectional get _drawerInnerAlignment {
|
AlignmentDirectional get _drawerInnerAlignment {
|
||||||
|
assert(widget.alignment != null);
|
||||||
switch (widget.alignment) {
|
switch (widget.alignment) {
|
||||||
case DrawerAlignment.start:
|
case DrawerAlignment.start:
|
||||||
return AlignmentDirectional.centerEnd;
|
return AlignmentDirectional.centerEnd;
|
||||||
case DrawerAlignment.end:
|
case DrawerAlignment.end:
|
||||||
return AlignmentDirectional.centerStart;
|
return AlignmentDirectional.centerStart;
|
||||||
}
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildDrawer(BuildContext context) {
|
Widget _buildDrawer(BuildContext context) {
|
||||||
|
@ -630,7 +630,7 @@ void main() {
|
|||||||
const String endDrawerLabel = 'I am the label on end side';
|
const String endDrawerLabel = 'I am the label on end side';
|
||||||
|
|
||||||
final SemanticsTester semantics = new SemanticsTester(tester);
|
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),
|
body: const Text(bodyLabel),
|
||||||
drawer: const Drawer(child:const Text(drawerLabel)),
|
drawer: const Drawer(child:const Text(drawerLabel)),
|
||||||
endDrawer: const Drawer(child:const Text(endDrawerLabel)),
|
endDrawer: const Drawer(child:const Text(endDrawerLabel)),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user