Repository: flutter
Issue: Exception thrown while displaying Text() widgets initialized with empty strings ("")
Labels: framework,a: typography,a: error message,has reproducible steps,P2,found in release: 3.3,found in release: 3.5,team-framework,triaged-framework

Hi there,
found this strange bug tryng to display 3 Text() widgets inside a ClipRect().
If any of the initial strings are empty (""), an exception is thrown.
When the strings are initialized with a character, everything is fine...
Test program and log output follow.

## Steps to Reproduce
<details>
 <summary>Source code:</summary>

```
import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        // This is the theme of your application.
        //
        // Try running your application with "flutter run". You'll see the
        // application has a blue toolbar. Then, without quitting the app, try
        // changing the primarySwatch below to Colors.green and then invoke
        // "hot reload" (press "r" in the console where you ran "flutter run",
        // or simply save your changes to "hot reload" in a Flutter IDE).
        // Notice that the counter didn't reset back to zero; the application
        // is not restarted.
        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);

  // This widget is the home page of your application. It is stateful, meaning
  // that it has a State object (defined below) that contains fields that affect
  // how it looks.

  // This class is the configuration for the state. It holds the values (in this
  // case the title) provided by the parent (in this case the App widget) and
  // used by the build method of the State. Fields in a Widget subclass are
  // always marked "final".

  final String title;

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  int _counter = 0;

  void _incrementCounter() {
    setState(() {
      // This call to setState tells the Flutter framework that something has
      // changed in this State, which causes it to rerun the build method below
      // so that the display can reflect the updated values. If we changed
      // _counter without calling setState(), then the build method would not be
      // called again, and so nothing would appear to happen.
      _counter++;
    });
  }

  Widget display(Orientation orientation) {
    var valueStyle = TextStyle(
      backgroundColor: Colors.black,
      color: Colors.lightGreen,
    );
    var labelStyle = TextStyle(
      backgroundColor: Colors.black,
      color: Colors.white,
    );
    var flexDelta = orientation == Orientation.landscape ? 3 : 2;
    var text = "";
    var label = "";
    var labelUnit = "";
    var showAltLabel = false;

    var display = ClipRRect(
      borderRadius: BorderRadius.circular(5),
      child: Container(
        color: Colors.black,
        child: Padding(
          padding: const EdgeInsets.all(0),
          child: Column(
            children: <Widget>[
              Expanded(
                child: FittedBox(
                  child: GestureDetector(
                    onTap: () => showAltLabel = !showAltLabel,
                    child: Text(
                      text,
                      maxLines: 1,
                      textAlign: TextAlign.end,
                      style: valueStyle,
                    ),
                   ),
                  alignment: Alignment.bottomLeft,
                  fit: BoxFit.contain,
                ),
                flex: 8 - flexDelta,
              ),
              Expanded(
                child: Padding(
                  padding: const EdgeInsets.fromLTRB(4, 1, 4, 0),
                  child: Row(
                    children: <Widget>[
                      Expanded(
                        child: FittedBox(
                          child: Text(
                            label,
                            textAlign: TextAlign.start,
                            style: labelStyle,
                          ),
                          alignment: Alignment.bottomLeft,
                        ),
                      ),
                      Expanded(
                        child: FittedBox(
                          child: Text(
                            labelUnit,
                            textAlign: TextAlign.end,
                            style: labelStyle,
                          ),
                          alignment: Alignment.bottomRight,
                        ),
                      ),
                    ],
                  ),
                ),
                flex: 1,
              ),
            ],
          ),
        ),
      ),
    );

    return display;
  }

  @override
  Widget build(BuildContext context) {
    // This method is rerun every time setState is called, for instance as done
    // by the _incrementCounter method above.
    //
    // The Flutter framework has been optimized to make rerunning build methods
    // fast, so that you can just rebuild anything that needs updating rather
    // than having to individually change instances of widgets.
    return Scaffold(
      appBar: AppBar(
        // Here we take the value from the MyHomePage object that was created by
        // the App.build method, and use it to set our appbar title.
        title: Text(widget.title),
      ),
      body: Center(
        // Center is a layout widget. It takes a single child and positions it
        // in the middle of the parent.
        child: Column(
          // Column is also layout widget. It takes a list of children and
          // arranges them vertically. By default, it sizes itself to fit its
          // children horizontally, and tries to be as tall as its parent.
          //
          // Invoke "debug painting" (press "p" in the console, choose the
          // "Toggle Debug Paint" action from the Flutter Inspector in Android
          // Studio, or the "Toggle Debug Paint" command in Visual Studio Code)
          // to see the wireframe for each widget.
          //
          // Column has various properties to control how it sizes itself and
          // how it positions its children. Here we use mainAxisAlignment to
          // center the children vertically; the main axis here is the vertical
          // axis because Columns are vertical (the cross axis would be
          // horizontal).
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            Text(
              'You have pushed the button this many times:',
            ),
            Text(
              '$_counter',
              style: Theme.of(context).textTheme.display1,
            ),
            Expanded(
              child: display(Orientation.portrait),
            ),
          ],
        ),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: _incrementCounter,
        tooltip: 'Increment',
        child: Icon(Icons.add),
      ), // This trailing comma makes auto-formatting nicer for build methods.
    );
  }
}

```
</details>
<details>
 <summary>Logs</summary>

```
I/flutter (17586): ══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞═════════════════════════════════════════════════════════
I/flutter (17586): The following assertion was thrown during performLayout():
I/flutter (17586): 'package:flutter/src/rendering/box.dart': Failed assertion: line 307 pos 12: 'width > 0.0': is not
I/flutter (17586): true.
I/flutter (17586): 
I/flutter (17586): Either the assertion indicates an error in the framework itself, or we should provide substantially
I/flutter (17586): more information in this error message to help you determine and fix the underlying cause.
I/flutter (17586): In either case, please report this assertion by filing a bug on GitHub:
I/flutter (17586):   https://github.com/flutter/flutter/issues/new?template=BUG.md
I/flutter (17586): 
I/flutter (17586): When the exception was thrown, this was the stack:
I/flutter (17586): #2      BoxConstraints.constrainSizeAndAttemptToPreserveAspectRatio (package:flutter/src/rendering/box.dart:307:12)
I/flutter (17586): #3      RenderFittedBox.performLayout (package:flutter/src/rendering/proxy_box.dart:2252:26)
I/flutter (17586): #4      RenderObject.layout (package:flutter/src/rendering/object.dart:1619:7)
I/flutter (17586): #5      RenderFlex.performLayout (package:flutter/src/rendering/flex.dart:805:17)
I/flutter (17586): #6      RenderObject.layout (package:flutter/src/rendering/object.dart:1619:7)
I/flutter (17586): #7      RenderPadding.performLayout (package:flutter/src/rendering/shifted_box.dart:206:11)
I/flutter (17586): #8      RenderObject.layout (package:flutter/src/rendering/object.dart:1619:7)
I/flutter (17586): #9      _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13)
I/flutter (17586): #10     RenderObject.layout (package:flutter/src/rendering/object.dart:1619:7)
I/flutter (17586): #11     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13)
I/flutter (17586): #12     _RenderCustomClip.performLayout (package:flutter/src/rendering/proxy_box.dart:1214:11)
I/flutter (17586): #13     RenderObject.layout (package:flutter/src/rendering/object.dart:1619:7)
I/flutter (17586): #14     RenderFlex.performLayout (package:flutter/src/rendering/flex.dart:805:17)
I/flutter (17586): #15     RenderObject.layout (package:flutter/src/rendering/object.dart:1619:7)
I/flutter (17586): #16     RenderPositionedBox.performLayout (package:flutter/src/rendering/shifted_box.dart:392:13)
I/flutter (17586): #17     RenderObject.layout (package:flutter/src/rendering/object.dart:1619:7)
I/flutter (17586): #18     MultiChildLayoutDelegate.layoutChild (package:flutter/src/rendering/custom_layout.dart:142:11)
I/flutter (17586): #19     _ScaffoldLayout.performLayout (package:flutter/src/material/scaffold.dart:443:7)
I/flutter (17586): #20     MultiChildLayoutDelegate._callPerformLayout (package:flutter/src/rendering/custom_layout.dart:212:7)
I/flutter (17586): #21     RenderCustomMultiChildLayoutBox.performLayout (package:flutter/src/rendering/custom_layout.dart:356:14)
I/flutter (17586): #22     RenderObject.layout (package:flutter/src/rendering/object.dart:1619:7)
I/flutter (17586): #23     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13)
I/flutter (17586): #24     RenderObject.layout (package:flutter/src/rendering/object.dart:1619:7)
I/flutter (17586): #25     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13)
I/flutter (17586): #26     _RenderCustomClip.performLayout (package:flutter/src/rendering/proxy_box.dart:1214:11)
I/flutter (17586): #27     RenderObject.layout (package:flutter/src/rendering/object.dart:1619:7)
I/flutter (17586): #28     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13)
I/flutter (17586): #29     RenderObject.layout (package:flutter/src/rendering/object.dart:1619:7)
I/flutter (17586): #30     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13)
I/flutter (17586): #31     RenderObject.layout (package:flutter/src/rendering/object.dart:1619:7)
I/flutter (17586): #32     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13)
I/flutter (17586): #33     RenderObject.layout (package:flutter/src/rendering/object.dart:1619:7)
I/flutter (17586): #34     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13)
I/flutter (17586): #35     RenderObject.layout (package:flutter/src/rendering/object.dart:1619:7)
I/flutter (17586): #36     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13)
I/flutter (17586): #37     RenderObject.layout (package:flutter/src/rendering/object.dart:1619:7)
I/flutter (17586): #38     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13)
I/flutter (17586): #39     RenderObject.layout (package:flutter/src/rendering/object.dart:1619:7)
I/flutter (17586): #40     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13)
I/flutter (17586): #41     RenderObject.layout (package:flutter/src/rendering/object.dart:1619:7)
I/flutter (17586): #42     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13)
I/flutter (17586): #43     RenderOffstage.performLayout (package:flutter/src/rendering/proxy_box.dart:3076:13)
I/flutter (17586): #44     RenderObject.layout (package:flutter/src/rendering/object.dart:1619:7)
I/flutter (17586): #45     RenderStack.performLayout (package:flutter/src/rendering/stack.dart:510:15)
I/flutter (17586): #46     RenderObject.layout (package:flutter/src/rendering/object.dart:1619:7)
I/flutter (17586): #47     __RenderTheatre&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13)
I/flutter (17586): #48     RenderObject.layout (package:flutter/src/rendering/object.dart:1619:7)
I/flutter (17586): #49     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13)
I/flutter (17586): #50     RenderObject.layout (package:flutter/src/rendering/object.dart:1619:7)
I/flutter (17586): #51     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13)
I/flutter (17586): #52     RenderObject.layout (package:flutter/src/rendering/object.dart:1619:7)
I/flutter (17586): #53     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13)
I/flutter (17586): #54     RenderObject.layout (package:flutter/src/rendering/object.dart:1619:7)
I/flutter (17586): #55     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13)
I/flutter (17586): #56     RenderObject.layout (package:flutter/src/rendering/object.dart:1619:7)
I/flutter (17586): #57     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:105:13)
I/flutter (17586): #58     RenderObject.layout (package:flutter/src/rendering/object.dart:1619:7)
I/flutter (17586): #59     RenderView.performLayout (package:flutter/src/rendering/view.dart:151:13)
I/flutter (17586): #60     RenderObject._layoutWithoutResize (package:flutter/src/rendering/object.dart:1496:7)
I/flutter (17586): #61     PipelineOwner.flushLayout (package:flutter/src/rendering/object.dart:765:18)
I/flutter (17586): #62     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:346:19)
I/flutter (17586): #63     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding&WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:701:13)
I/flutter (17586): #64     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:285:5)
I/flutter (17586): #65     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1016:15)
I/flutter (17586): #66     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:958:9)
I/flutter (17586): #67     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.scheduleWarmUpFrame.<anonymous closure> (package:flutter/src/scheduler/binding.dart:784:7)
I/flutter (17586): #76     _Timer._runTimers (dart:isolate-patch/timer_impl.dart:382:19)
I/flutter (17586): #77     _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:416:5)
I/flutter (17586): #78     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:12)
I/flutter (17586): (elided 10 frames from class _AssertionError, package dart:async, and package dart:async-patch)
I/flutter (17586): 
I/flutter (17586): The following RenderObject was being processed when the exception was fired: RenderFittedBox#91341 relayoutBoundary=up7 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE:
I/flutter (17586):   creator: FittedBox ← Expanded ← Column ← Padding ← DecoratedBox ← Container ← ClipRRect ← Expanded ←
I/flutter (17586):     Column ← Center ← MediaQuery ← LayoutId-[<_ScaffoldSlot.body>] ← ⋯
I/flutter (17586):   parentData: offset=Offset(0.0, 0.0); flex=6; fit=FlexFit.tight (can use size)
I/flutter (17586):   constraints: BoxConstraints(0.0<=w<=392.7, h=515.5)
I/flutter (17586):   size: MISSING
I/flutter (17586):   fit: contain
I/flutter (17586):   alignment: bottomLeft
I/flutter (17586):   textDirection: ltr
I/flutter (17586): This RenderObject had the following descendants (showing up to depth 5):
I/flutter (17586):     child: RenderSemanticsGestureHandler#4c185 relayoutBoundary=up8 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
I/flutter (17586):       child: RenderPointerListener#9a7cd relayoutBoundary=up9 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
I/flutter (17586):         child: RenderParagraph#7202a relayoutBoundary=up10 NEEDS-PAINT
I/flutter (17586):           text: TextSpan
I/flutter (17586): ════════════════════════════════════════════════════════════════════════════════════════════════════
I/flutter (17586): Another exception was thrown: RenderBox was not laid out: RenderFittedBox#91341 relayoutBoundary=up7 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
I/flutter (17586): Another exception was thrown: RenderBox was not laid out: RenderFlex#166f3 relayoutBoundary=up6 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
I/flutter (17586): Another exception was thrown: RenderBox was not laid out: RenderPadding#60e47 relayoutBoundary=up5 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
I/flutter (17586): Another exception was thrown: RenderBox was not laid out: RenderDecoratedBox#cefcb relayoutBoundary=up4 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
I/flutter (17586): Another exception was thrown: RenderBox was not laid out: RenderClipRRect#8accf relayoutBoundary=up3 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
I/flutter (17586): Another exception was thrown: 'package:flutter/src/rendering/shifted_box.dart': Failed assertion: line 321 pos 12: 'child.hasSize': is not true.
I/flutter (17586): Another exception was thrown: NoSuchMethodError: The method '>' was called on null.
```
</details>

```
Analyzing bug_test...
No issues found! (ran in 1.6s)
```

```
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.7.8+hotfix.3, on Microsoft Windows [Version 10.0.18362.239], locale it-IT)

[√] Android toolchain - develop for Android devices (Android SDK version 29.0.0)
[√] Android Studio (version 3.4)
[√] Android Studio (version 3.5)
[√] IntelliJ IDEA Community Edition (version 2019.1)
[√] VS Code (version 1.36.1)
[√] Connected device (1 available)

• No issues found!
```