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
4be45e95
Unverified
Commit
4be45e95
authored
Mar 21, 2023
by
Kate Lovett
Committed by
GitHub
Mar 21, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove indicator from scrolling tab bars (#123057)
Remove indicator from scrolling tab bars
parent
c40dd276
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
7 deletions
+18
-7
tabs.dart
packages/flutter/lib/src/material/tabs.dart
+11
-7
tabs_test.dart
packages/flutter/test/material/tabs_test.dart
+7
-0
No files found.
packages/flutter/lib/src/material/tabs.dart
View file @
4be45e95
...
...
@@ -1441,13 +1441,17 @@ class _TabBarState extends State<TabBar> {
if
(
widget
.
isScrollable
)
{
_scrollController
??=
_TabBarScrollController
(
this
);
tabBar
=
SingleChildScrollView
(
dragStartBehavior:
widget
.
dragStartBehavior
,
scrollDirection:
Axis
.
horizontal
,
controller:
_scrollController
,
padding:
widget
.
padding
,
physics:
widget
.
physics
,
child:
tabBar
,
tabBar
=
ScrollConfiguration
(
// The scrolling tabs should not show an overscroll indicator.
behavior:
ScrollConfiguration
.
of
(
context
).
copyWith
(
overscroll:
false
),
child:
SingleChildScrollView
(
dragStartBehavior:
widget
.
dragStartBehavior
,
scrollDirection:
Axis
.
horizontal
,
controller:
_scrollController
,
padding:
widget
.
padding
,
physics:
widget
.
physics
,
child:
tabBar
,
),
);
}
else
if
(
widget
.
padding
!=
null
)
{
tabBar
=
Padding
(
...
...
packages/flutter/test/material/tabs_test.dart
View file @
4be45e95
...
...
@@ -1351,6 +1351,13 @@ void main() {
expect
(
controller
.
indexIsChanging
,
false
);
});
testWidgets
(
'Scrollable TabBar does not have overscroll indicator'
,
(
WidgetTester
tester
)
async
{
final
List
<
String
>
tabs
=
<
String
>[
'A'
,
'B'
,
'C'
];
await
tester
.
pumpWidget
(
buildFrame
(
tabs:
tabs
,
value:
'A'
,
isScrollable:
true
));
expect
(
find
.
byType
(
GlowingOverscrollIndicator
),
findsNothing
);
});
testWidgets
(
'TabBar should not throw when animation is disabled in controller'
,
(
WidgetTester
tester
)
async
{
// Regression test for https://github.com/flutter/flutter/issues/102600
final
List
<
String
>
tabs
=
<
String
>[
'A'
];
...
...
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