title: Flutter - Access color from LinearGradient()
body: <p>I have a <a href="https://api.flutter.dev/flutter/painting/LinearGradient-class.html" rel="nofollow noreferrer">LinearGradient()</a> from which I'd like to extract a color :</p>
  <pre><code>final niceGradient = LinearGradient(
   begin: Alignment.topCenter,
   end: Alignment.bottomRight,
    colors: [
      Color(0xFFC70000),
      Color(0xFFBBF000),
    ],
  ),
  </code></pre>
  <p>in Order to use say one of its colors in a Text(....colors:   )) or :</p>
  <pre><code>Container(
      color: #firstcolorfrom_niceGradient#)
  </code></pre>
  <p>Like this - How do you do it ?</p>