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
80f88a79
Unverified
Commit
80f88a79
authored
Jan 20, 2021
by
Kate Lovett
Committed by
GitHub
Jan 20, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove deprecated Scaffold.resizeToAvoidBottomPadding (#72890)
parent
ca372891
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
35 additions
and
29 deletions
+35
-29
fix_data.yaml
packages/flutter/lib/fix_data.yaml
+23
-0
scaffold.dart
packages/flutter/lib/src/material/scaffold.dart
+1
-15
persistent_bottom_sheet_test.dart
...s/flutter/test/material/persistent_bottom_sheet_test.dart
+1
-1
scaffold_test.dart
packages/flutter/test/material/scaffold_test.dart
+0
-13
material.dart
packages/flutter/test_fixes/material.dart
+5
-0
material.dart.expect
packages/flutter/test_fixes/material.dart.expect
+5
-0
No files found.
packages/flutter/lib/fix_data.yaml
View file @
80f88a79
...
...
@@ -11,6 +11,29 @@
version
:
1
transforms
:
# Changes made in https://github.com/flutter/flutter/pull/26259
-
title
:
'
Rename
to
resizeToAvoidBottomInset'
date
:
2020-12-23
element
:
uris
:
[
'
material.dart'
]
field
:
'
resizeToAvoidBottomPadding'
inClass
:
'
Scaffold'
changes
:
-
kind
:
'
rename'
newName
:
'
resizeToAvoidBottomInset'
# Changes made in https://github.com/flutter/flutter/pull/26259
-
title
:
'
Rename
to
resizeToAvoidBottomInset'
date
:
2020-12-23
element
:
uris
:
[
'
material.dart'
]
constructor
:
'
'
inClass
:
'
Scaffold'
changes
:
-
kind
:
'
renameParameter'
oldName
:
'
resizeToAvoidBottomPadding'
newName
:
'
resizeToAvoidBottomInset'
# Change made in https://github.com/flutter/flutter/pull/20649
# TODO(Piinks): Add tests when `bulkApply:false` testing is supported, https://github.com/dart-lang/sdk/issues/44639
-
title
:
'
Replace
with
CupertinoPopupSurface'
...
...
packages/flutter/lib/src/material/scaffold.dart
View file @
80f88a79
...
...
@@ -1449,7 +1449,6 @@ class Scaffold extends StatefulWidget {
this
.
bottomNavigationBar
,
this
.
bottomSheet
,
this
.
backgroundColor
,
this
.
resizeToAvoidBottomPadding
,
this
.
resizeToAvoidBottomInset
,
this
.
primary
=
true
,
this
.
drawerDragStartBehavior
=
DragStartBehavior
.
start
,
...
...
@@ -1726,18 +1725,6 @@ class Scaffold extends StatefulWidget {
/// * [showModalBottomSheet], which displays a modal bottom sheet.
final
Widget
?
bottomSheet
;
/// This flag is deprecated, please use [resizeToAvoidBottomInset]
/// instead.
///
/// Originally the name referred [MediaQueryData.padding]. Now it refers
/// [MediaQueryData.viewInsets], so using [resizeToAvoidBottomInset]
/// should be clearer to readers.
@Deprecated
(
'Use resizeToAvoidBottomInset to specify if the body should resize when the keyboard appears. '
'This feature was deprecated after v1.1.9.'
)
final
bool
?
resizeToAvoidBottomPadding
;
/// If true the [body] and the scaffold's floating widgets should size
/// themselves to avoid the onscreen keyboard whose height is defined by the
/// ambient [MediaQuery]'s [MediaQueryData.viewInsets] `bottom` property.
...
...
@@ -2730,9 +2717,8 @@ class ScaffoldState extends State<Scaffold> with TickerProviderStateMixin, Resto
late
_ScaffoldGeometryNotifier
_geometryNotifier
;
// Backwards compatibility for deprecated resizeToAvoidBottomPadding property
bool
get
_resizeToAvoidBottomInset
{
return
widget
.
resizeToAvoidBottomInset
??
widget
.
resizeToAvoidBottomPadding
??
true
;
return
widget
.
resizeToAvoidBottomInset
??
true
;
}
@override
...
...
packages/flutter/test/material/persistent_bottom_sheet_test.dart
View file @
80f88a79
...
...
@@ -385,7 +385,7 @@ void main() {
padding:
EdgeInsets
.
all
(
50.0
),
),
child:
Scaffold
(
resizeToAvoidBottom
Padding
:
false
,
resizeToAvoidBottom
Inset
:
false
,
body:
Builder
(
builder:
(
BuildContext
context
)
{
scaffoldContext
=
context
;
...
...
packages/flutter/test/material/scaffold_test.dart
View file @
80f88a79
...
...
@@ -103,19 +103,6 @@ void main() {
bodyBox
=
tester
.
renderObject
(
find
.
byKey
(
bodyKey
));
expect
(
bodyBox
.
size
,
equals
(
const
Size
(
800.0
,
544.0
)));
// Backwards compatibility: deprecated resizeToAvoidBottomPadding flag
await
tester
.
pumpWidget
(
boilerplate
(
MediaQuery
(
data:
const
MediaQueryData
(
viewInsets:
EdgeInsets
.
only
(
bottom:
100.0
)),
child:
Scaffold
(
appBar:
AppBar
(
title:
const
Text
(
'Title'
)),
body:
Container
(
key:
bodyKey
),
resizeToAvoidBottomPadding:
false
,
),
)));
bodyBox
=
tester
.
renderObject
(
find
.
byKey
(
bodyKey
));
expect
(
bodyBox
.
size
,
equals
(
const
Size
(
800.0
,
544.0
)));
});
testWidgets
(
'Scaffold large bottom padding test'
,
(
WidgetTester
tester
)
async
{
...
...
packages/flutter/test_fixes/material.dart
View file @
80f88a79
...
...
@@ -5,6 +5,11 @@
import
'package:flutter/material.dart'
;
void
main
(
)
{
// Changes made in https://github.com/flutter/flutter/pull/26259
const
Scaffold
scaffold
=
Scaffold
(
resizeToAvoidBottomPadding:
true
);
final
bool
resize
=
scaffold
.
resizeToAvoidBottomPadding
;
// Change made in https://github.com/flutter/flutter/pull/15303
showDialog
(
child:
Text
(
'Fix me.'
));
...
...
packages/flutter/test_fixes/material.dart.expect
View file @
80f88a79
...
...
@@ -5,6 +5,11 @@
import 'package:flutter/material.dart';
void main() {
// Changes made in https://github.com/flutter/flutter/pull/26259
const Scaffold scaffold = Scaffold(resizeToAvoidBottomInset: true);
final bool resize = scaffold.resizeToAvoidBottomInset;
// Change made in https://github.com/flutter/flutter/pull/15303
showDialog(builder: (context) => Text('Fix me.'));
...
...
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