title: Replacing a color constant value with a getMethod? while maintaining other predefined values
body: <pre><code>SizedBox(
          height: 50,
          child: Row(
            mainAxisAlignment: MainAxisAlignment.spaceEvenly,
            children: List.generate(
              listCategory.length,
              (index) =&gt; Text(
                listCategory[index],
                style: kTabText, ----The constant styled variable ----
              ),
            ),
          ),
        ),
  </code></pre>
  <p>The getColor method i'm looking to use,</p>
  <pre><code>Color getColor() {
  late final Color color;
  if (_currentPage &gt;= 0 &amp;&amp; _currentPage &lt; 0.7) {
    color = listShoes[0].listImage[0].color;
  } else if (_currentPage &gt; 0.7 &amp;&amp; _currentPage &lt; 1.7) {
    color = listShoes[1].listImage[1].color;
  } else if (_currentPage &gt; 1.7 &amp;&amp; _currentPage &lt; 2.7) {
    color = listShoes[2].listImage[2].color;
  }
  return color;
  </code></pre>
  <p>}</p>
  <p>Essentially I only want to replace the color on the constant text style without having to write the code manually, simply replace color only.</p>