@@ -80,7 +80,8 @@ class CssBoxWidget extends StatelessWidget {
80
80
child: top
81
81
? child
82
82
: MediaQuery (
83
- data: MediaQuery .of (context).copyWith (textScaler: TextScaler .linear (1.0 )),
83
+ data: MediaQuery .of (context)
84
+ .copyWith (textScaler: TextScaler .linear (1.0 )),
84
85
child: child,
85
86
),
86
87
),
@@ -484,8 +485,8 @@ class RenderCSSBox extends RenderBox
484
485
}
485
486
486
487
@override
487
- double ? computeDryBaseline (covariant BoxConstraints constraints,
488
- TextBaseline baseline) {
488
+ double ? computeDryBaseline (
489
+ covariant BoxConstraints constraints, TextBaseline baseline) {
489
490
return null ;
490
491
}
491
492
@@ -532,9 +533,15 @@ class RenderCSSBox extends RenderBox
532
533
// `width: double.infinity` on the inner Container, but we do it here
533
534
// to keep the infinite width from being applied if the parent's width is
534
535
// also infinite.
535
- if (display.isBlock && ! shrinkWrap && ! childIsReplaced && containingBlockSize.width.isFinite) {
536
+ if (display.isBlock &&
537
+ ! shrinkWrap &&
538
+ ! childIsReplaced &&
539
+ containingBlockSize.width.isFinite) {
536
540
childConstraints = childConstraints.enforce (BoxConstraints (
537
- maxWidth: math.max (containingBlockSize.width, childConstraints.maxWidth),
541
+ maxWidth: math.max (
542
+ containingBlockSize.width,
543
+ childConstraints.maxWidth,
544
+ ),
538
545
minWidth: childConstraints.maxWidth,
539
546
));
540
547
}
@@ -556,7 +563,9 @@ class RenderCSSBox extends RenderBox
556
563
width = childSize.width + horizontalMargins;
557
564
height = childSize.height + verticalMargins;
558
565
} else if (display.isBlock) {
559
- width = (shrinkWrap || childIsReplaced || containingBlockSize.width.isInfinite)
566
+ width = (shrinkWrap ||
567
+ childIsReplaced ||
568
+ containingBlockSize.width.isInfinite)
560
569
? childSize.width + horizontalMargins
561
570
: containingBlockSize.width;
562
571
height = childSize.height + verticalMargins;
@@ -808,7 +817,9 @@ extension Normalize on Dimension {
808
817
809
818
double _calculateEmValue (Style style, BuildContext buildContext) {
810
819
return (style.fontSize? .emValue ?? 16 ) *
811
- (MediaQuery .maybeTextScalerOf (buildContext)? .scale (style.fontSize? .emValue ?? 16 ) ?? 1.0 ) *
820
+ (MediaQuery .maybeTextScalerOf (buildContext)
821
+ ? .scale (style.fontSize? .emValue ?? 16 ) ??
822
+ 1.0 ) *
812
823
MediaQuery .of (buildContext).devicePixelRatio;
813
824
}
814
825
0 commit comments