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
6ce90a93
Unverified
Commit
6ce90a93
authored
Apr 16, 2020
by
Shi-Hao Hong
Committed by
GitHub
Apr 16, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SnackBarBehavior.floating offset fix by default (#54985)
parent
54cdc26a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
14 deletions
+1
-14
scaffold.dart
packages/flutter/lib/src/material/scaffold.dart
+1
-1
snack_bar_test.dart
packages/flutter/test/material/snack_bar_test.dart
+0
-13
No files found.
packages/flutter/lib/src/material/scaffold.dart
View file @
6ce90a93
...
...
@@ -1343,7 +1343,7 @@ class Scaffold extends StatefulWidget {
'eventually be removed. '
'This feature was deprecated after v1.15.3.'
)
static
bool
shouldSnackBarIgnoreFABRect
=
fals
e
;
static
bool
shouldSnackBarIgnoreFABRect
=
tru
e
;
/// The state from the closest instance of this class that encloses the given context.
///
...
...
packages/flutter/test/material/snack_bar_test.dart
View file @
6ce90a93
...
...
@@ -1075,10 +1075,6 @@ void main() {
'
$behavior
should align SnackBar with the bottom of Scaffold '
'when Scaffold has no other elements'
,
(
WidgetTester
tester
)
async
{
// TODO(shihaohong): Remove this flag once the migration to fix
// SnackBarBehavior.floating is complete.
Scaffold
.
shouldSnackBarIgnoreFABRect
=
true
;
await
tester
.
pumpWidget
(
MaterialApp
(
home:
Scaffold
(
...
...
@@ -1101,9 +1097,6 @@ void main() {
final
Offset
scaffoldBottomLeft
=
tester
.
getBottomLeft
(
find
.
byType
(
Scaffold
));
expect
(
snackBarBottomLeft
,
equals
(
scaffoldBottomLeft
));
// TODO(shihaohong): Remove this flag once the migration to fix
// SnackBarBehavior.floating is complete.
Scaffold
.
shouldSnackBarIgnoreFABRect
=
false
;
},
);
...
...
@@ -1111,9 +1104,6 @@ void main() {
'
$behavior
should align SnackBar with the top of BottomNavigationBar '
'when Scaffold has no FloatingActionButton'
,
(
WidgetTester
tester
)
async
{
// TODO(shihaohong): Remove this flag once the migration to fix
// SnackBarBehavior.floating is complete.
Scaffold
.
shouldSnackBarIgnoreFABRect
=
true
;
final
UniqueKey
boxKey
=
UniqueKey
();
await
tester
.
pumpWidget
(
MaterialApp
(
...
...
@@ -1138,9 +1128,6 @@ void main() {
final
Offset
bottomNavigationBarTopLeft
=
tester
.
getTopLeft
(
find
.
byKey
(
boxKey
));
expect
(
snackBarBottomLeft
,
equals
(
bottomNavigationBarTopLeft
));
// TODO(shihaohong): Remove this flag once the migration to fix
// SnackBarBehavior.floating is complete.
Scaffold
.
shouldSnackBarIgnoreFABRect
=
false
;
},
);
...
...
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