title: Flutter Dynamic Height of Widget in Row
body: <p>How I can expand a height of a Widget dynamically to a parent widget.</p>
  <p>Specially in my example I want to expand the red bar to parent widgets. My text can be changed to x lines.</p>
  <p>Current code:</p>
  <pre class="lang-dart prettyprint-override"><code>import 'package:flutter/material.dart';
  
  class ExampleView extends StatelessWidget {
    final String title;
  
    const ExampleView({Key key, this.onTap, this.title}) : super(key: key);
  
    final text = 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et';
  
    @override
    Widget build(BuildContext context) {
      return Container(
        margin: EdgeInsets.only(left: 40),
        padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
        color: Colors.grey[200],
        child: Row(
          crossAxisAlignment: CrossAxisAlignment.start,
          children: &lt;Widget&gt;[
            Container(
              margin: const EdgeInsets.only(right: 12, top: 4, bottom: 4),
              width: 6,
              height: 80, // FIXME: Dynamic
              color: Colors.red,
            ),
            Expanded(
              child: Text(text),
            )
          ],
        ),
      );
    }
  }
  </code></pre>
  <p>Current solution:</p>
  <p><a href="https://i.stack.imgur.com/jymvQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jymvQ.png" alt="Current solution" /></a></p>
  <p>Desired solution:</p>
  <p><a href="https://i.stack.imgur.com/nF7S2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nF7S2.png" alt="enter image description here" /></a></p>
  <p>Thank you in advance for your help!</p>