title: How to get a value from List<Map<String, dynamic>> in Flutter
body: <p>I'm new to flutter and I have set of <code>List&lt;Map&lt;String, dynamic&gt;&gt;</code> data which contains the values name, amount and date. </p>
  
  <p>e.g.</p>
  
  <blockquote>
    <p>[{name: Product 1, amount: 24.5, date: 2019-07-07 22:21:57}]</p>
    
    <p>[{name: Product 2, amount: 29.5, date: 2019-07-07 22:21:57}]</p>
  </blockquote>
  
  <p>I'm passing the list into a list view builder, however before passing the list i need to validate the date in the list with the current date. Please find my code below:</p>
  
  <pre><code>import 'package:flutter/material.dart';
  import 'package:learning_app/product.dart';
  
  class BuildProduct extends StatelessWidget {
    final List&lt;Map&lt;String, dynamic&gt;&gt; products;
    final Function updateProduct;
  
    Tasks(this.products, this.updateProduct);
  
    Widget _buildCard() {
      DateTime _currentDate = DateTime.now();
  
      Widget ProductCard = Center(
        child: Text('No Products added'),
      );
      if (products.length &gt; 0) {
        ProductCard = ListView.builder(
          scrollDirection: Axis.vertical,
          shrinkWrap: true,
          itemCount: products.length,
          itemBuilder: (BuildContext context, int index) {
            if(Need to compare the date in the products == currentDate) {
              return ProductCard(products[index], index, updateProduct);
            }
          }
        );
      }
      return ProductCard;
    }
  
    @override
    Widget build(BuildContext context) {
      return _buildCard();
    }
  }
  </code></pre>
  
  <p>I need to read the date value in the list and compare that with the current date before each listview item is created. Any help is appreciated thanks </p>