Skip to content

Commit 4659916

Browse files
authored
Remove offstage wording from KeepAlive (flutter#24881)
What KeepAlive does is different from the Offstage widget. Let's not confuse these two and be more speicific in the wording for KeepAlive.
1 parent 7058cf5 commit 4659916

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/flutter/lib/src/rendering/sliver_multi_box_adaptor.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,7 @@ abstract class RenderSliverMultiBoxAdaptor extends RenderSliver
602602
final List<int> indices = _keepAliveBucket.keys.toList()..sort();
603603
for (int index in indices) {
604604
children.add(_keepAliveBucket[index].toDiagnosticsNode(
605-
name: 'child with index $index (kept alive offstage)',
605+
name: 'child with index $index (kept alive but not laid out)',
606606
style: DiagnosticsTreeStyle.offstage,
607607
));
608608
}

packages/flutter/test/widgets/keep_alive_test.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ void main() {
464464
' ╎ constraints: BoxConstraints(w=800.0, h=400.0)\n'
465465
' ╎ size: Size(800.0, 400.0)\n'
466466
' ╎\n'
467-
' ╎╌child with index 0 (kept alive offstage): RenderLimitedBox#00000\n' // <----- this one is index 0 and is marked as being offstage
467+
' ╎╌child with index 0 (kept alive but not laid out): RenderLimitedBox#00000\n' // <----- this one is index 0 and is marked as being kept alive but not laid out
468468
' ╎ │ parentData: index=0; keepAlive; layoutOffset=0.0\n'
469469
' ╎ │ constraints: BoxConstraints(w=800.0, h=400.0)\n'
470470
' ╎ │ size: Size(800.0, 400.0)\n'
@@ -476,7 +476,7 @@ void main() {
476476
' ╎ constraints: BoxConstraints(w=800.0, h=400.0)\n'
477477
' ╎ size: Size(800.0, 400.0)\n'
478478
' ╎\n' // <----- dashed line ends here
479-
' └╌child with index 3 (kept alive offstage): RenderLimitedBox#00000\n'
479+
' └╌child with index 3 (kept alive but not laid out): RenderLimitedBox#00000\n'
480480
' │ parentData: index=3; keepAlive; layoutOffset=1200.0\n'
481481
' │ constraints: BoxConstraints(w=800.0, h=400.0)\n'
482482
' │ size: Size(800.0, 400.0)\n'

0 commit comments

Comments
 (0)