Skip to content

Commit a458a5b

Browse files
committed
Revert "Make WidgetPlaceholder.firstChild public"
This reverts commit 044c1a8.
1 parent 539ca4e commit a458a5b

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

packages/core/lib/src/core_helpers.dart

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,8 @@ class WidgetPlaceholder extends StatelessWidget {
9595
/// A human-readable description of this placeholder.
9696
final String? debugLabel;
9797

98-
/// The first child widget.
99-
final Widget? firstChild;
100-
10198
final List<WidgetPlaceholderBuilder> _builders;
99+
final Widget? _firstChild;
102100

103101
/// Creates a placeholder.
104102
WidgetPlaceholder({
@@ -107,13 +105,13 @@ class WidgetPlaceholder extends StatelessWidget {
107105
this.debugLabel,
108106
super.key,
109107
}) : _builders = builder != null ? [builder] : [],
110-
firstChild = child;
108+
_firstChild = child;
111109

112110
/// Whether this placeholder renders anything.
113-
bool get isEmpty => firstChild == null && _builders.isEmpty;
111+
bool get isEmpty => _firstChild == null && _builders.isEmpty;
114112

115113
@override
116-
Widget build(BuildContext context) => callBuilders(context, firstChild);
114+
Widget build(BuildContext context) => callBuilders(context, _firstChild);
117115

118116
/// Calls builder callbacks on the specified [child] widget.
119117
@protected

packages/core/lib/src/internal/core_build_tree.dart

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -396,9 +396,6 @@ class _WidgetPlaceholderDefault extends StatelessWidget
396396
@override
397397
String? get debugLabel => null;
398398

399-
@override
400-
Widget? get firstChild => null;
401-
402399
@override
403400
bool get isEmpty => true;
404401

0 commit comments

Comments
 (0)