title: Flutter: How to color the data displayed from JSON according to the declarations
body: <p>this is json file</p>
  
  <pre><code>[
    {
      "id": 1,
      "country": "United States",
      "continent": "North America"
    },
    {
      "id": 2,
      "country": "Germany",
      "continent": "Europe"
    },
    {
      "id": 3,
      "country": "United Kingdom",
      "continent": "Europe"
    }
  ]
  </code></pre>
  
  <p>I want to set the condition as follows:</p>
  
  <p><strong>1. Countries in North America (United States) will use
      <code>CotinentColor.NA</code><br>
   2. Countries in Europe (Germany &amp; United Kingdom)
      will use <code>CotinentColor.EU</code></strong></p>
  
  <p>So what do I have to do?</p>
  
  <p>This is custom_color file </p>
  
  <pre><code>import 'package:flutter/material.dart';
  
  class ContinentColor {
    static const Color NA = Color(0xFFFF9E80);
    static const Color EU = Color(0xFF2196F3);
    static const Color Asia = Color(0xFFE0E0E0);
  }
  </code></pre>
  
  <p>this is the main file:</p>
  
  <pre><code>
                          ListView.builder(
                              itemCount: countries.length,
                              itemBuilder: (context, index) {
                                return Padding(
                                    padding: const EdgeInsets.all(5.0),
                                    child: Column(children: &lt;Widget&gt;[
                                      Text(
                                        countries[index].country,
                                        style: const TextStyle(
                                            color:,
                                            // How to apply color according follow the conditional
                                      )
                                    ]));
                              });
  
  </code></pre>