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
dfd0c627
Unverified
Commit
dfd0c627
authored
Sep 15, 2020
by
GodHyum
Committed by
GitHub
Sep 15, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove back button when using end drawer (#63272)
parent
37b03ec2
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
1 deletion
+18
-1
app_bar.dart
packages/flutter/lib/src/material/app_bar.dart
+1
-1
app_bar_test.dart
packages/flutter/test/material/app_bar_test.dart
+17
-0
No files found.
packages/flutter/lib/src/material/app_bar.dart
View file @
dfd0c627
...
...
@@ -555,7 +555,7 @@ class _AppBarState extends State<AppBar> {
tooltip:
MaterialLocalizations
.
of
(
context
).
openAppDrawerTooltip
,
);
}
else
{
if
(
canPop
)
if
(
!
hasEndDrawer
&&
canPop
)
leading
=
useCloseButton
?
const
CloseButton
()
:
const
BackButton
();
}
}
...
...
packages/flutter/test/material/app_bar_test.dart
View file @
dfd0c627
...
...
@@ -2194,4 +2194,21 @@ void main() {
// By default toolbarHeight is 56.0.
expect
(
tester
.
getRect
(
find
.
byKey
(
key
)),
const
Rect
.
fromLTRB
(
0
,
0
,
100
,
56
));
});
testWidgets
(
"AppBar with EndDrawer doesn't have leading"
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
MaterialApp
(
home:
Scaffold
(
appBar:
AppBar
(),
endDrawer:
const
Drawer
(),
),
));
final
Finder
endDrawerFinder
=
find
.
byTooltip
(
'Open navigation menu'
);
await
tester
.
tap
(
endDrawerFinder
);
await
tester
.
pump
();
final
Finder
appBarFinder
=
find
.
byType
(
NavigationToolbar
);
NavigationToolbar
getAppBarWidget
(
Finder
finder
)
=>
tester
.
widget
<
NavigationToolbar
>(
finder
);
expect
(
getAppBarWidget
(
appBarFinder
).
leading
,
null
);
});
}
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