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
b770cdf2
Unverified
Commit
b770cdf2
authored
May 06, 2019
by
Ian Hickson
Committed by
GitHub
May 06, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Add `shape` property to SliverAppBar (#31662)" (#32155)
This reverts commit
28b58db1
.
parent
fecba558
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
46 deletions
+0
-46
app_bar.dart
packages/flutter/lib/src/material/app_bar.dart
+0
-11
app_bar_test.dart
packages/flutter/test/material/app_bar_test.dart
+0
-35
No files found.
packages/flutter/lib/src/material/app_bar.dart
View file @
b770cdf2
...
...
@@ -681,7 +681,6 @@ class _SliverAppBarDelegate extends SliverPersistentHeaderDelegate {
@required
this
.
floating
,
@required
this
.
pinned
,
@required
this
.
snapConfiguration
,
@required
this
.
shape
,
})
:
assert
(
primary
||
topPadding
==
0.0
),
_bottomHeight
=
bottom
?.
preferredSize
?.
height
??
0.0
;
...
...
@@ -706,7 +705,6 @@ class _SliverAppBarDelegate extends SliverPersistentHeaderDelegate {
final
double
topPadding
;
final
bool
floating
;
final
bool
pinned
;
final
ShapeBorder
shape
;
final
double
_bottomHeight
;
...
...
@@ -761,7 +759,6 @@ class _SliverAppBarDelegate extends SliverPersistentHeaderDelegate {
primary:
primary
,
centerTitle:
centerTitle
,
titleSpacing:
titleSpacing
,
shape:
shape
,
toolbarOpacity:
toolbarOpacity
,
bottomOpacity:
pinned
?
1.0
:
(
visibleMainHeight
/
_bottomHeight
).
clamp
(
0.0
,
1.0
),
),
...
...
@@ -905,7 +902,6 @@ class SliverAppBar extends StatefulWidget {
this
.
floating
=
false
,
this
.
pinned
=
false
,
this
.
snap
=
false
,
this
.
shape
,
})
:
assert
(
automaticallyImplyLeading
!=
null
),
assert
(
forceElevated
!=
null
),
assert
(
primary
!=
null
),
...
...
@@ -1066,12 +1062,6 @@ class SliverAppBar extends StatefulWidget {
/// Defaults to [NavigationToolbar.kMiddleSpacing].
final
double
titleSpacing
;
/// The material's shape as well its shadow.
///
/// A shadow is only displayed if the [elevation] is greater than
/// zero.
final
ShapeBorder
shape
;
/// The size of the app bar when it is fully expanded.
///
/// By default, the total height of the toolbar and the bottom widget (if
...
...
@@ -1225,7 +1215,6 @@ class _SliverAppBarState extends State<SliverAppBar> with TickerProviderStateMix
topPadding:
topPadding
,
floating:
widget
.
floating
,
pinned:
widget
.
pinned
,
shape:
widget
.
shape
,
snapConfiguration:
_snapConfiguration
,
),
),
...
...
packages/flutter/test/material/app_bar_test.dart
View file @
b770cdf2
...
...
@@ -1514,39 +1514,4 @@ void main() {
expect
(
getMaterialWidget
().
shape
,
roundedRectangleBorder
);
});
testWidgets
(
'SliverAppBar with shape'
,
(
WidgetTester
tester
)
async
{
const
RoundedRectangleBorder
roundedRectangleBorder
=
RoundedRectangleBorder
(
borderRadius:
BorderRadius
.
all
(
Radius
.
circular
(
15.0
)),
);
await
tester
.
pumpWidget
(
MaterialApp
(
home:
CustomScrollView
(
slivers:
const
<
Widget
>[
SliverAppBar
(
leading:
Text
(
'L'
),
title:
Text
(
'No Scaffold'
),
shape:
roundedRectangleBorder
,
actions:
<
Widget
>[
Text
(
'A1'
),
Text
(
'A2'
)],
),
],
),
),
);
final
Finder
sliverAppBarFinder
=
find
.
byType
(
SliverAppBar
);
SliverAppBar
getAppBarWidget
()
{
return
tester
.
widget
<
SliverAppBar
>(
sliverAppBarFinder
);
}
expect
(
getAppBarWidget
().
shape
,
roundedRectangleBorder
);
final
Finder
materialFinder
=
find
.
byType
(
Material
);
Material
getMaterialWidget
()
{
return
tester
.
widget
<
Material
>(
materialFinder
);
}
expect
(
getMaterialWidget
().
shape
,
roundedRectangleBorder
);
});
}
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