Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
39142146
Unverified
Commit
39142146
authored
Nov 02, 2017
by
Adam Barth
Committed by
GitHub
Nov 02, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix analyzer warnings (#12840)
parent
c608e666
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
drawer.dart
packages/flutter/lib/src/material/drawer.dart
+5
-1
scaffold_test.dart
packages/flutter/test/material/scaffold_test.dart
+1
-1
No files found.
packages/flutter/lib/src/material/drawer.dart
View file @
39142146
...
...
@@ -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
)
{
...
...
packages/flutter/test/material/scaffold_test.dart
View file @
39142146
...
...
@@ -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
)),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment