title: How to find the `text` property of a Widget during testing in Flutter?
body: <p>I have a piece of code that creates a Table of Text widgets, like this:</p>
  
  <pre><code>return Table(
    defaultColumnWidth: FixedColumnWidth(120.0),
    children: &lt;TableRow&gt;[
      TableRow(
        children: &lt;Widget&gt;[Text('toffee'), Text('potato')],
      ),
      TableRow(
        children: &lt;Widget&gt;[Text('cheese'), Text('pie')],
      ),
    ],
  );
  </code></pre>
  
  <p>I want to test that the first item in the Table is indeed the word 'toffee'. I set up my test and get to this part:</p>
  
  <pre><code>var firstCell = find
        .descendant(
          of: find.byType(Table),
          matching: find.byType(Text),
        )
        .evaluate()
        .toList()[0].widget;
  
    expect(firstCell, 'toffee');
  </code></pre>
  
  <p>This definitely doesn't work because <code>firstCell</code> is of type Widget, which is not equal to the String <code>toffee</code>. </p>
  
  <p>I only see a <code>toString()</code> function, like this:</p>
  
  <pre><code>'Text("toffee", inherit: true, color: Color(0xff616161), size: 16.0,
   textAlign: left)'
  </code></pre>
  
  <p>How do I extract the <code>text</code> property to get the word <code>toffee</code>?</p>
  
  <p>Right now it seems like all I can do is check that the <code>.toString().contains('toffee')</code> which isn't ideal.</p>