@@ -171,11 +171,17 @@ class HtmlFlex extends MultiChildRenderObjectWidget {
171171 }
172172}
173173
174- extension type const _AxisSize ._(Size _size) {
174+ class _AxisSize {
175+ final Size _size;
176+
175177 _AxisSize ({required double mainAxisExtent, required double crossAxisExtent})
176- : this ._(Size (mainAxisExtent, crossAxisExtent));
177- _AxisSize .fromSize ({required Size size, required Axis direction})
178- : this ._(_convert (size, direction));
178+ : _size = Size (mainAxisExtent, crossAxisExtent);
179+
180+ const _AxisSize ._(this ._size);
181+
182+ factory _AxisSize .fromSize ({required Size size, required Axis direction}) {
183+ return _AxisSize ._(_convert (size, direction));
184+ }
179185
180186 static const _AxisSize empty = _AxisSize ._(Size .zero);
181187
@@ -207,8 +213,11 @@ extension type const _AxisSize._(Size _size) {
207213 );
208214}
209215
210- extension type const _AscentDescent ._(
211- (double ascent, double descent)? ascentDescent) {
216+ typedef _AscentDescentValue = (double ascent, double descent);
217+
218+ class _AscentDescent {
219+ final _AscentDescentValue ? _value;
220+
212221 factory _AscentDescent ({
213222 required double ? baselineOffset,
214223 required double crossSize,
@@ -217,12 +226,17 @@ extension type const _AscentDescent._(
217226 ? none
218227 : _AscentDescent ._((baselineOffset, crossSize - baselineOffset));
219228 }
229+
230+ const _AscentDescent ._(this ._value);
231+
220232 static const _AscentDescent none = _AscentDescent ._(null );
221233
222- double ? get baselineOffset => ascentDescent ? .$1;
234+ double ? get baselineOffset => _value ? .$1;
223235
224- _AscentDescent operator + (_AscentDescent other) => switch ((this , other)) {
225- (null , final _AscentDescent v) || (final _AscentDescent v, null ) => v,
236+ _AscentDescent operator + (_AscentDescent other) =>
237+ switch ((_value, other._value)) {
238+ (final _AscentDescentValue ? _, null ) => this ,
239+ (null , final _AscentDescentValue ? _) => other,
226240 (
227241 (final double xAscent, final double xDescent),
228242 (final double yAscent, final double yDescent),
@@ -1006,7 +1020,7 @@ class RenderHtmlFlex extends RenderBox
10061020 }
10071021 assert (totalFlex == 0 );
10081022
1009- accumulatedSize += switch (accumulatedAscentDescent) {
1023+ accumulatedSize += switch (accumulatedAscentDescent._value ) {
10101024 null => _AxisSize .empty,
10111025 (final double ascent, final double descent) => _AxisSize (
10121026 mainAxisExtent: 0 ,
0 commit comments