Repository: flutter
Issue: Text overflow calculation is bugged when AspectRatio is involved
Labels: framework,a: typography,has reproducible steps,P2,found in release: 3.7,found in release: 3.11,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
-->

## Steps to Reproduce

<!-- Please include full steps to reproduce so that we can reproduce the problem. -->

1. Execute `flutter run` on https://dartpad.dev/?id=ceb704408119b088368e6db1b4d4a350
2. The text renders completely on the component that doesnt have an AspectRatio

**Expected results:** <!-- what did you want to see? -->
The text should be completely visible in either case

**Actual results:** <!-- what did you see? -->
The text gets cutoff when one of the children is an AspectRatio(), when text doesnt have a maxlines property it should be able to grow as required

<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
// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      debugShowCheckedModeBanner: false,
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatelessWidget {
  final String title;

  const MyHomePage({
    Key? key,
    required this.title,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Column(
          children: [
            Container(
              color: Colors.amber,
              width: 200,
              child: Component1(),
            ),
            const SizedBox(height: 10),
            Container(
              color: Colors.amber,
              width: 200,
              child: Component2(),
            ),
          ],
        ),
      ),
    );
  }
}

class Component1 extends StatelessWidget {
  const Component1({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return IntrinsicHeight(
      child: Row(
        children: [
          const Expanded(
              child: Text(
                  'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus convallis aliquam scelerisque. Sed eget metus vulputate, tempor')),
          const SizedBox(width: 10),
          Container(
            height: 40,
            color: Colors.teal,
            child: const AspectRatio(
              aspectRatio: 1,
            ),
          ),
        ],
      ),
    );
  }
}

class Component2 extends StatelessWidget {
  const Component2({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return IntrinsicHeight(
      child: Row(
        children: [
          const Expanded(
              child: Text(
                  'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus convallis aliquam scelerisque. Sed eget metus vulputate, tempor')),
          const SizedBox(width: 10),
          Container(
            height: 40,
            width: 40,
            color: Colors.teal,
          ),
        ],
      ),
    );
  }
}

```

</details>
<img width="260" alt="image" src="https://user-images.githubusercontent.com/22373191/182628523-2f1e4e99-8673-4071-9b2d-44d417593a5f.png">