Skip to content

Commit 17f794a

Browse files
committed
deleted analysis_benchmark.json & renamed param to "extendBody"
1 parent dca486b commit 17f794a

3 files changed

Lines changed: 19 additions & 24 deletions

File tree

‎analysis_benchmark.json‎

Lines changed: 0 additions & 5 deletions
This file was deleted.

‎packages/flutter/lib/src/material/scaffold.dart‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -285,14 +285,14 @@ class _ScaffoldLayout extends MultiChildLayoutDelegate {
285285
@required this.currentFloatingActionButtonLocation,
286286
@required this.floatingActionButtonMoveAnimationProgress,
287287
@required this.floatingActionButtonMotionAnimator,
288-
this.extendedBody = false,
288+
this.extendBody = false,
289289
}) : assert(minInsets != null),
290290
assert(textDirection != null),
291291
assert(geometryNotifier != null),
292292
assert(previousFloatingActionButtonLocation != null),
293293
assert(currentFloatingActionButtonLocation != null);
294294

295-
final bool extendedBody;
295+
final bool extendBody;
296296
final EdgeInsets minInsets;
297297
final TextDirection textDirection;
298298
final _ScaffoldGeometryNotifier geometryNotifier;
@@ -347,7 +347,7 @@ class _ScaffoldLayout extends MultiChildLayoutDelegate {
347347
if (hasChild(_ScaffoldSlot.body)) {
348348
double bodyMaxHeight = math.max(0.0, contentBottom - contentTop);
349349

350-
if (extendedBody) {
350+
if (extendBody) {
351351
bodyMaxHeight += bottomWidgetsHeight;
352352
}
353353

@@ -804,7 +804,7 @@ class Scaffold extends StatefulWidget {
804804
this.resizeToAvoidBottomPadding,
805805
this.resizeToAvoidBottomInset,
806806
this.primary = true,
807-
this.extendedBody = false,
807+
this.extendBody = false,
808808
this.drawerDragStartBehavior = DragStartBehavior.down,
809809
}) : assert(primary != null),
810810
assert(drawerDragStartBehavior != null),
@@ -813,7 +813,7 @@ class Scaffold extends StatefulWidget {
813813
/// If true and a [bottomNavigationBar] is specified then the body
814814
/// extends to the bottom of the Scaffold, instead of only extending
815815
/// to the top of the [bottomNavigationBar].
816-
final bool extendedBody;
816+
final bool extendBody;
817817

818818
/// An app bar to display at the top of the scaffold.
819819
final PreferredSizeWidget appBar;
@@ -1826,8 +1826,8 @@ class ScaffoldState extends State<Scaffold> with TickerProviderStateMixin {
18261826
bottom: _resizeToAvoidBottomInset ? mediaQuery.viewInsets.bottom : 0.0,
18271827
);
18281828

1829-
// extendedBody locked when keyboard is open
1830-
final bool _extendedBody = minInsets.bottom > 0 ? false : widget.extendedBody;
1829+
// extendBody locked when keyboard is open
1830+
final bool _extendBody = minInsets.bottom > 0 ? false : widget.extendBody;
18311831

18321832
return _ScaffoldScope(
18331833
hasDrawer: hasDrawer,
@@ -1840,7 +1840,7 @@ class ScaffoldState extends State<Scaffold> with TickerProviderStateMixin {
18401840
return CustomMultiChildLayout(
18411841
children: children,
18421842
delegate: _ScaffoldLayout(
1843-
extendedBody: _extendedBody,
1843+
extendBody: _extendBody,
18441844
minInsets: minInsets,
18451845
currentFloatingActionButtonLocation: _floatingActionButtonLocation,
18461846
floatingActionButtonMoveAnimationProgress: _floatingActionButtonMoveController.value,

‎packages/flutter/test/material/scaffold_test.dart‎

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -575,10 +575,10 @@ void main() {
575575
expect(tester.renderObject<RenderBox>(find.byKey(testKey)).localToGlobal(Offset.zero), const Offset(0.0, 0.0));
576576
});
577577

578-
testWidgets('body size with extendedBody', (WidgetTester tester) async {
578+
testWidgets('body size with extendBody', (WidgetTester tester) async {
579579
Key bodyKey;
580580

581-
Widget buildFrame({bool extendedBody, bool resizeToAvoidBottomInset, double viewInsetBottom}){
581+
Widget buildFrame({bool extendBody, bool resizeToAvoidBottomInset, double viewInsetBottom}){
582582
bodyKey = UniqueKey();
583583

584584
return Directionality(
@@ -589,7 +589,7 @@ void main() {
589589
),
590590
child: Scaffold(
591591
resizeToAvoidBottomInset: resizeToAvoidBottomInset,
592-
extendedBody: extendedBody,
592+
extendBody: extendBody,
593593
body: Container(
594594
key: bodyKey,
595595
),
@@ -601,28 +601,28 @@ void main() {
601601
);
602602
}
603603

604-
await tester.pumpWidget(buildFrame(extendedBody: true, resizeToAvoidBottomInset: true, viewInsetBottom: 0.0));
604+
await tester.pumpWidget(buildFrame(extendBody: true, resizeToAvoidBottomInset: true, viewInsetBottom: 0.0));
605605
expect(tester.getSize(find.byKey(bodyKey)), const Size(800.0, 600.0));
606606

607-
await tester.pumpWidget(buildFrame(extendedBody: false, resizeToAvoidBottomInset: true, viewInsetBottom: 0.0));
607+
await tester.pumpWidget(buildFrame(extendBody: false, resizeToAvoidBottomInset: true, viewInsetBottom: 0.0));
608608
expect(tester.getSize(find.byKey(bodyKey)), const Size(800.0, 552.0));
609609

610-
await tester.pumpWidget(buildFrame(extendedBody: true, resizeToAvoidBottomInset: false, viewInsetBottom: 0.0));
610+
await tester.pumpWidget(buildFrame(extendBody: true, resizeToAvoidBottomInset: false, viewInsetBottom: 0.0));
611611
expect(tester.getSize(find.byKey(bodyKey)), const Size(800.0, 600.0));
612612

613-
await tester.pumpWidget(buildFrame(extendedBody: false, resizeToAvoidBottomInset: false, viewInsetBottom: 0.0));
613+
await tester.pumpWidget(buildFrame(extendBody: false, resizeToAvoidBottomInset: false, viewInsetBottom: 0.0));
614614
expect(tester.getSize(find.byKey(bodyKey)), const Size(800.0, 552.0));
615615

616-
await tester.pumpWidget(buildFrame(extendedBody: true, resizeToAvoidBottomInset: true, viewInsetBottom: 100.0));
616+
await tester.pumpWidget(buildFrame(extendBody: true, resizeToAvoidBottomInset: true, viewInsetBottom: 100.0));
617617
expect(tester.getSize(find.byKey(bodyKey)), const Size(800.0, 500.0));
618618

619-
await tester.pumpWidget(buildFrame(extendedBody: false, resizeToAvoidBottomInset: true, viewInsetBottom: 100.0));
619+
await tester.pumpWidget(buildFrame(extendBody: false, resizeToAvoidBottomInset: true, viewInsetBottom: 100.0));
620620
expect(tester.getSize(find.byKey(bodyKey)), const Size(800.0, 500.0));
621621

622-
await tester.pumpWidget(buildFrame(extendedBody: true, resizeToAvoidBottomInset: false, viewInsetBottom: 100.0));
622+
await tester.pumpWidget(buildFrame(extendBody: true, resizeToAvoidBottomInset: false, viewInsetBottom: 100.0));
623623
expect(tester.getSize(find.byKey(bodyKey)), const Size(800.0, 600.0));
624624

625-
await tester.pumpWidget(buildFrame(extendedBody: false, resizeToAvoidBottomInset: false, viewInsetBottom: 100.0));
625+
await tester.pumpWidget(buildFrame(extendBody: false, resizeToAvoidBottomInset: false, viewInsetBottom: 100.0));
626626
expect(tester.getSize(find.byKey(bodyKey)), const Size(800.0, 552.0));
627627

628628
});

0 commit comments

Comments
 (0)