title: Dart list item not found
body: <p>I have created a list of map of antigens(elements) and added some antigens into another list i.e. selected. I want the color of the list item to be red if it is contained in the selected list.
  But it doesn't show color change even on printing the selected items the antigen is present there.</p>
  <pre><code>import 'package:allerpath_app_new/controller/mulit_allergy_profile_controller.dart';
  import 'package:allerpath_app_new/model/blood_antigens.dart';
  import 'package:flutter/material.dart';
  import 'package:get/get_core/src/get_main.dart';
  import 'package:get/get_instance/src/extension_instance.dart';
  
  class TestingMAP extends StatelessWidget {
    TestingMAP({Key? key}) : super(key: key);
  
    final controller = Get.put(MultiProfile());
  
    final BloodAntigens antigen = BloodAntigens();
  
    @override
    Widget build(BuildContext context) {
      List&lt;dynamic&gt; _namesList =
          controller.selectedAntigens.map((e) =&gt; e['name']).toList();
      return SafeArea(
          child: Scaffold(
        body: ListView.builder(
          itemCount: antigen.inhalantPanel.length,
          itemBuilder: (context, index) {
            var item = antigen.inhalantPanel[index];
            return Text(
              item['name'],
              style: TextStyle(
                color: (_namesList.contains(item)) ? Colors.red : Colors.black,
              ),
            );
          },
        ),
      ));
    }
  }
  
  </code></pre>
  <p>I printed the list and if it is present or not</p>
  <pre><code>print(controller.selectedAntigens);
  print((controller.selectedAntigens.contains(item)) ? '1' : '0');
  </code></pre>
  <p><strong>Output:</strong></p>
  <pre><code>[{name: STRAW DUST, value: 123}]
  0
  </code></pre>
  <p><strong>Model code</strong></p>
  <pre><code>List&lt;Map&lt;String, dynamic&gt;&gt; inhalantPanel = [
      {'name': 'HOUSE DUST', 'value': 0.35},
      {'name': 'MIXED MITES', 'value': 0.35},
      {'name': 'COCKROACH', 'value': 0.35},
      {'name': 'STRAW DUST', 'value': 0.35},
      {'name': 'COTTON', 'value': 0.35},
      {'name': 'JUTE', 'value': 0.35},
    ];
  </code></pre>