Repository: flutter
Issue: Exception thrown using CrossAxisAlignment.baseline in row only with wider screens (tablet, mobile in landscape)
Labels: framework,a: error message,a: layout,has reproducible steps,P2,found in release: 2.8,found in release: 2.9,team-framework,triaged-framework

<!-- Thank you for using Flutter!

     If you are looking for support, please check out our documentation
     or consider asking a question on Stack Overflow:
      * https://flutter.dev/
      * https://api.flutter.dev/
      * https://stackoverflow.com/questions/tagged/flutter?sort=frequent

     If you have found a bug or if our documentation doesn't have an answer
     to what you're looking for, then fill out the template below. Please read
     our guide to filing a bug first: https://flutter.dev/docs/resources/bug-reports
-->

Exception thrown when opening an alert dialog containing a row with alignment set to baseline.
Exception is not thrown with mobile in portrait, only when it is in landscape (or on a tablet - wider screen)

## Steps to Reproduce

<!-- Please include full steps to reproduce so that we can reproduce the problem. -->

1. Execute `flutter run` on the code sample <!-- (see "Code sample" section below) -->
2. Rotate device to landscape if mobile (only fails in landscape due to wider screen)
3. Click button to open alert dialog

**Expected results:** <!-- what did you want to see? -->
Alert dialog should open

**Actual results:** <!-- what did you see? -->
Exception thrown, dialog is not displayed

<details>
<summary>Code sample</summary>

<!--
      Please create a minimal reproducible sample that shows the problem
      and attach it below between the lines with the backticks.

      To create it you can use `flutter create bug` command and update the `main.dart` file.

      Alternatively, you can use https://dartpad.dev/
      which is capable of creating and running small Flutter apps.

      Without this we will unlikely be able to progress on the issue, and because of that
      we regretfully will have to close it.
-->

```dart
import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      title: 'Material App',
      home: AlertTest(),
    );
  }
}

class AlertTest extends StatelessWidget {
  const AlertTest({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
        body: Center(
      child: MaterialButton(
        child: const Text('Open Dialog'),
        color: Colors.blue,
        onPressed: () {
          showDialog(
              context: context,
              builder: (context) {
                return AlertDialog(
                  title: const Text('This is a test'),
                  content: Row(
                    crossAxisAlignment: CrossAxisAlignment.baseline,
                    textBaseline: TextBaseline.alphabetic,
                    children: const [
                      Text('Text 1'),
                      Text('Text 2'),
                    ],
                  ),
                );
              });
        },
      ),
    ));
  }
}

```

</details>

<details>
  <summary>Logs</summary>

<!--
      Run your application with `flutter run --verbose` and attach all the
      log output below between the lines with the backticks. If there is an
      exception, please see if the error message includes enough information
      to explain how to solve the issue.
-->

```
 ══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞═════════════════════════════════════════════════════════
                    The following assertion was thrown during performLayout():
                    Intrinsics are not available for CrossAxisAlignment.baseline.
                    'package:flutter/src/rendering/flex.dart':
                    Failed assertion: line 523 pos 9: 'RenderObject.debugCheckingIntrinsics'
                    
                    Either the assertion indicates an error in the framework itself, or we should provide substantially
                    more information in this error message to help you determine and fix the underlying cause.
                    In either case, please report this assertion by filing a bug on GitHub:
                      https://github.com/flutter/flutter/issues/new?template=2_bug.md
                    
                    The relevant error-causing widget was:
                      AlertDialog AlertDialog:file:///Users/lewisgarton/Development/work/app_bar_test/lib/main.dart:29:24
                    
                    When the exception was thrown, this was the stack:
                    #2      RenderFlex._getIntrinsicSize (package:flutter/src/rendering/flex.dart:523:9)
                    #3      RenderFlex.computeMaxIntrinsicWidth (package:flutter/src/rendering/flex.dart:613:12)
                    #4      RenderBox._computeIntrinsicDimension.<anonymous closure> (package:flutter/src/rendering/box.dart:1376:23)
                    #5      _LinkedHashMapMixin.putIfAbsent (dart:collection-patch/compact_hash.dart:453:23)
                    #6      RenderBox._computeIntrinsicDimension (package:flutter/src/rendering/box.dart:1374:42)
                    #7      RenderBox.getMaxIntrinsicWidth (package:flutter/src/rendering/box.dart:1569:12)
                    #8      RenderProxyBoxMixin.computeMaxIntrinsicWidth (package:flutter/src/rendering/proxy_box.dart:80:21)
                    #9      RenderBox._computeIntrinsicDimension.<anonymous closure> (package:flutter/src/rendering/box.dart:1376:23)
                    #10     _LinkedHashMapMixin.putIfAbsent (dart:collection-patch/compact_hash.dart:453:23)
                    #11     RenderBox._computeIntrinsicDimension (package:flutter/src/rendering/box.dart:1374:42)
                    #12     RenderBox.getMaxIntrinsicWidth (package:flutter/src/rendering/box.dart:1569:12)
                    #13     RenderPadding.computeMaxIntrinsicWidth (package:flutter/src/rendering/shifted_box.dart:178:21)
                    #14     RenderBox._computeIntrinsicDimension.<anonymous closure> (package:flutter/src/rendering/box.dart:1376:23)
                    #15     _LinkedHashMapMixin.putIfAbsent (dart:collection-patch/compact_hash.dart:453:23)
                    #16     RenderBox._computeIntrinsicDimension (package:flutter/src/rendering/box.dart:1374:42)
                    #17     RenderBox.getMaxIntrinsicWidth (package:flutter/src/rendering/box.dart:1569:12)
                    #18     RenderFlex.computeMaxIntrinsicWidth.<anonymous closure> (package:flutter/src/rendering/flex.dart:616:60)
                    #19     RenderFlex._getIntrinsicSize (package:flutter/src/rendering/flex.dart:593:58)
                    #20     RenderFlex.computeMaxIntrinsicWidth (package:flutter/src/rendering/flex.dart:613:12)
                    #21     RenderBox._computeIntrinsicDimension.<anonymous closure> (package:flutter/src/rendering/box.dart:1376:23)
                    #22     _LinkedHashMapMixin.putIfAbsent (dart:collection-patch/compact_hash.dart:453:23)
                    #23     RenderBox._computeIntrinsicDimension (package:flutter/src/rendering/box.dart:1374:42)
                    #24     RenderBox.getMaxIntrinsicWidth (package:flutter/src/rendering/box.dart:1569:12)
                    #25     RenderIntrinsicWidth._computeSize (package:flutter/src/rendering/proxy_box.dart:692:37)
                    #26     RenderIntrinsicWidth.performLayout (package:flutter/src/rendering/proxy_box.dart:717:12)
                    #27     RenderObject.layout (package:flutter/src/rendering/object.dart:1852:7)
                    #28     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:116:14)
                    #29     RenderObject.layout (package:flutter/src/rendering/object.dart:1852:7)
                    #30     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:116:14)
                    #31     RenderObject.layout (package:flutter/src/rendering/object.dart:1852:7)
                    #32     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:116:14)
                    #33     RenderCustomPaint.performLayout (package:flutter/src/rendering/custom_paint.dart:545:11)
                    #34     RenderObject.layout (package:flutter/src/rendering/object.dart:1852:7)
                    #35     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:116:14)
                    #36     _RenderCustomClip.performLayout (package:flutter/src/rendering/proxy_box.dart:1376:11)
                    #37     RenderObject.layout (package:flutter/src/rendering/object.dart:1852:7)
                    #38     RenderConstrainedBox.performLayout (package:flutter/src/rendering/proxy_box.dart:277:14)
                    #39     RenderObject.layout (package:flutter/src/rendering/object.dart:1852:7)
                    #40     RenderPositionedBox.performLayout (package:flutter/src/rendering/shifted_box.dart:437:14)
                    #41     RenderObject.layout (package:flutter/src/rendering/object.dart:1852:7)
                    #42     RenderPadding.performLayout (package:flutter/src/rendering/shifted_box.dart:233:12)
                    #43     RenderObject.layout (package:flutter/src/rendering/object.dart:1852:7)
                    #44     RenderPadding.performLayout (package:flutter/src/rendering/shifted_box.dart:233:12)
                    #45     RenderObject.layout (package:flutter/src/rendering/object.dart:1852:7)
                    #46     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:116:14)
                    #47     RenderObject.layout (package:flutter/src/rendering/object.dart:1852:7)
                    #48     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:116:14)
                    #49     RenderObject.layout (package:flutter/src/rendering/object.dart:1852:7)
                    #50     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:116:14)
                    #51     RenderObject.layout (package:flutter/src/rendering/object.dart:1852:7)
                    #52     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:116:14)
                    #53     RenderObject.layout (package:flutter/src/rendering/object.dart:1852:7)
                    #54     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:116:14)
                    #55     RenderObject.layout (package:flutter/src/rendering/object.dart:1852:7)
                    #56     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:116:14)
                    #57     RenderObject.layout (package:flutter/src/rendering/object.dart:1852:7)
                    #58     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:116:14)
                    #59     RenderObject.layout (package:flutter/src/rendering/object.dart:1852:7)
                    #60     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:116:14)
                    #61     RenderOffstage.performLayout (package:flutter/src/rendering/proxy_box.dart:3428:13)
                    #62     RenderObject.layout (package:flutter/src/rendering/object.dart:1852:7)
                    #63     RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:116:14)
                    #64     RenderObject.layout (package:flutter/src/rendering/object.dart:1852:7)
                    #65     _RenderTheatre.performLayout (package:flutter/src/widgets/overlay.dart:751:15)
                    #66     RenderObject._layoutWithoutResize (package:flutter/src/rendering/object.dart:1707:7)
                    #67     PipelineOwner.flushLayout (package:flutter/src/rendering/object.dart:879:18)
                    #68     RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:497:19)
                    #69     WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:883:13)
                    #70     RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:363:5)
                    #71     SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1145:15)
                    #72     SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1082:9)
                    #73     SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:996:5)
                    #77     _invoke (dart:ui/hooks.dart:150:10)
                    #78     PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:270:5)
                    #79     _drawFrame (dart:ui/hooks.dart:114:31)
                    (elided 5 frames from class _AssertionError and dart:async)
                    
                    The following RenderObject was being processed when the exception was fired: RenderIntrinsicWidth#a98f7 relayoutBoundary=up6 NEEDS-LAYOUT NEEDS-PAINT
NEEDS-COMPOSITING-BITS-UPDATE:
                      creator: IntrinsicWidth ← Semantics ← DefaultTextStyle ← AnimatedDefaultTextStyle ←
                        _InkFeatures-[GlobalKey#fc8ea ink renderer] ← NotificationListener<LayoutChangedNotification> ←
                        CustomPaint ← _ShapeBorderPaint ← PhysicalShape ← _MaterialInterior ← Material ← ConstrainedBox ←
                        ⋯
                      parentData: <none> (can use size)
                      constraints: BoxConstraints(280.0<=w<=1200.0, 0.0<=h<=680.0)
                      size: MISSING
                      stepWidth: null
                      stepHeight: null
                    This RenderObject had the following descendants (showing up to depth 5):
                        child: RenderFlex#9c99a NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
                          child 1: RenderPadding#bd991 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
                            child: RenderSemanticsAnnotations#3333b NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
                              child: RenderParagraph#803ca NEEDS-LAYOUT NEEDS-PAINT
                                text: TextSpan
                          child 2: RenderPadding#d05ef NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
                            child: RenderSemanticsAnnotations#31187 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
                              child: RenderFlex#6bb34 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
                                child 1: RenderParagraph#91fc3 NEEDS-LAYOUT NEEDS-PAINT
                                child 2: RenderParagraph#5fa21 NEEDS-LAYOUT NEEDS-PAINT
                    ════════════════════════════════════════════════════════════════════════════════════════════════════
[  +60 ms] 
           Another exception was thrown: RenderBox was not laid out: RenderIntrinsicWidth#a98f7 relayoutBoundary=up6 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
[  +63 ms] 
           Another exception was thrown: RenderBox was not laid out: RenderSemanticsAnnotations#dad78 relayoutBoundary=up5 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
[  +60 ms] 
           Another exception was thrown: RenderBox was not laid out: _RenderInkFeatures#df406 relayoutBoundary=up4 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
[  +49 ms] 
           Another exception was thrown: RenderBox was not laid out: RenderCustomPaint#f30b4 relayoutBoundary=up3 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
[  +29 ms] 
           Another exception was thrown: RenderBox was not laid out: RenderPhysicalShape#8490b relayoutBoundary=up2 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
[  +33 ms] 
           Another exception was thrown: 'package:flutter/src/rendering/shifted_box.dart': Failed assertion: line 348 pos 12: 'child!.hasSize': is not true.
[ +112 ms] 
                    Another exception was thrown: RenderBox was not laid out: RenderPhysicalShape#8490b relayoutBoundary=up2

```

<!--
     Run `flutter analyze` and attach any output of that command below.
     If there are any analysis errors, try resolving them before filing this issue.
-->

```

```

<!-- Finally, paste the output of running `flutter doctor -v` here. -->

```
[✓] Flutter (Channel stable, 2.8.1, on macOS 12.0.1 21A559 darwin-x64, locale en-NZ)
    • Flutter version 2.8.1 at /Users/lewisgarton/Development/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 77d935af4d (5 weeks ago), 2021-12-16 08:37:33 -0800
    • Engine revision 890a5fca2e
    • Dart version 2.15.1

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/lewisgarton/Library/Android/sdk
    • Platform android-31, build-tools 31.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.11.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2020.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)

[✓] VS Code (version 1.63.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.29.0

[✓] VS Code (version 1.62.3)
    • VS Code at /Users/lewisgarton/Downloads/Visual Studio Code.app/Contents
    • Flutter extension version 3.29.0

[✓] Connected device (3 available)
    • Android SDK built for x86 (mobile) • emulator-5554 • android-x86    • Android 11 (API 30) (emulator)
    • Android SDK built for x86 (mobile) • emulator-5556 • android-x86    • Android 11 (API 30) (emulator)
    • Chrome (web)                       • chrome        • web-javascript • Google Chrome 97.0.4692.71

• No issues found!
```

</details>


<!--
      Consider also attaching screenshots and/or videos to better
      illustrate the issue.

      You can upload them directly on GitHub.
      Beware that video file size is limited to 10MB.
-->