File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -95,8 +95,10 @@ 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+
98101 final List <WidgetPlaceholderBuilder > _builders;
99- final Widget ? _firstChild;
100102
101103 /// Creates a placeholder.
102104 WidgetPlaceholder ({
@@ -105,13 +107,13 @@ class WidgetPlaceholder extends StatelessWidget {
105107 this .debugLabel,
106108 super .key,
107109 }) : _builders = builder != null ? [builder] : [],
108- _firstChild = child;
110+ firstChild = child;
109111
110112 /// Whether this placeholder renders anything.
111- bool get isEmpty => _firstChild == null && _builders.isEmpty;
113+ bool get isEmpty => firstChild == null && _builders.isEmpty;
112114
113115 @override
114- Widget build (BuildContext context) => callBuilders (context, _firstChild );
116+ Widget build (BuildContext context) => callBuilders (context, firstChild );
115117
116118 /// Calls builder callbacks on the specified [child] widget.
117119 @protected
Original file line number Diff line number Diff line change @@ -396,6 +396,9 @@ class _WidgetPlaceholderDefault extends StatelessWidget
396396 @override
397397 String ? get debugLabel => null ;
398398
399+ @override
400+ Widget ? get firstChild => null ;
401+
399402 @override
400403 bool get isEmpty => true ;
401404
You can’t perform that action at this time.
0 commit comments