title: A value of type 'Color?' can't be assigned to a variable of type 'Color'
body: <p>Trying to pass a default value for background color to the constructor but these are the error messages popping up.
  I have tried using <strong>Colors.red[200]! and Colors.red.shade200</strong> but none of those worked out.</p>
  <pre><code>import &quot;package:flutter/material.dart&quot;;
  
  class Category {
    final String id;
    final Color bgColor;
    final String title;
  
    Category(
      {required this.id, required this.title, this.bgColor = Colors.red[200]});
  }
  </code></pre>
  <p><a href="https://i.stack.imgur.com/AYEym.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AYEym.png" alt="enter image description here" /></a></p>