From 46599167d59936d570c275881e98bcfda7381f57 Mon Sep 17 00:00:00 2001 From: Michael Goderbauer Date: Mon, 10 Dec 2018 22:37:46 -0800 Subject: [PATCH] Remove offstage wording from KeepAlive (#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. --- .../flutter/lib/src/rendering/sliver_multi_box_adaptor.dart | 2 +- packages/flutter/test/widgets/keep_alive_test.dart | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/flutter/lib/src/rendering/sliver_multi_box_adaptor.dart b/packages/flutter/lib/src/rendering/sliver_multi_box_adaptor.dart index e719a49325..453e9b4527 100644 --- a/packages/flutter/lib/src/rendering/sliver_multi_box_adaptor.dart +++ b/packages/flutter/lib/src/rendering/sliver_multi_box_adaptor.dart @@ -602,7 +602,7 @@ abstract class RenderSliverMultiBoxAdaptor extends RenderSliver final List indices = _keepAliveBucket.keys.toList()..sort(); for (int index in indices) { children.add(_keepAliveBucket[index].toDiagnosticsNode( - name: 'child with index $index (kept alive offstage)', + name: 'child with index $index (kept alive but not laid out)', style: DiagnosticsTreeStyle.offstage, )); } diff --git a/packages/flutter/test/widgets/keep_alive_test.dart b/packages/flutter/test/widgets/keep_alive_test.dart index a3139aa881..a17018108b 100644 --- a/packages/flutter/test/widgets/keep_alive_test.dart +++ b/packages/flutter/test/widgets/keep_alive_test.dart @@ -464,7 +464,7 @@ void main() { ' ╎ constraints: BoxConstraints(w=800.0, h=400.0)\n' ' ╎ size: Size(800.0, 400.0)\n' ' ╎\n' - ' ╎╌child with index 0 (kept alive offstage): RenderLimitedBox#00000\n' // <----- this one is index 0 and is marked as being offstage + ' ╎╌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 ' ╎ │ parentData: index=0; keepAlive; layoutOffset=0.0\n' ' ╎ │ constraints: BoxConstraints(w=800.0, h=400.0)\n' ' ╎ │ size: Size(800.0, 400.0)\n' @@ -476,7 +476,7 @@ void main() { ' ╎ constraints: BoxConstraints(w=800.0, h=400.0)\n' ' ╎ size: Size(800.0, 400.0)\n' ' ╎\n' // <----- dashed line ends here - ' └╌child with index 3 (kept alive offstage): RenderLimitedBox#00000\n' + ' └╌child with index 3 (kept alive but not laid out): RenderLimitedBox#00000\n' ' │ parentData: index=3; keepAlive; layoutOffset=1200.0\n' ' │ constraints: BoxConstraints(w=800.0, h=400.0)\n' ' │ size: Size(800.0, 400.0)\n'