title: The argument type 'Object?' can't be assigned to the parameter type 'String'
body: <p><a href="https://i.stack.imgur.com/o8X7n.png" rel="noreferrer">These are the errors I get</a></p>
  <p><strong>Here is my chart.dart file</strong></p>
  <pre><code>import 'package:flutter/material.dart';
  import 'package:udemy_expenses_app/widgets/chart_bar.dart';
  import '../models/tanscations.dart';
  import 'package:intl/intl.dart';
  import './chart_bar.dart';
  
  class Chart extends StatelessWidget {
    final List&lt;Transaction&gt; recentTransactions;
    Chart(this.recentTransactions);
    List&lt;Map&lt;String, Object&gt;&gt; get groupedTransactionValues {
    return List.generate(7, (index) {
     final weekDay = DateTime.now().subtract(
      Duration(
        days: index,
      ),
    );
    double totalSum = 0.0;
    for (var i = 0; i &lt; recentTransactions.length; i++) {
      if (recentTransactions[i].date.day == weekDay.day &amp;&amp;
          recentTransactions[i].date.month == weekDay.month &amp;&amp;
          recentTransactions[i].date.year == weekDay.year) {
        totalSum += recentTransactions[i].amount;
      }
    }
  
    return {
      'day': DateFormat.E().format(weekDay).substring(0, 1),
      'amount': totalSum,
    };
  });
  }
  
  double get totalSpending {
    return groupedTransactionValues.fold(0.0, (sum, item) {
    return sum + item['amount']; 
    //  Error: A value of type 'Object?' can't be assigned to a variable of type 'num'.
   });
  }
  
  @override
  Widget build(BuildContext context) {
    return Card(
      elevation: 6,
      margin: EdgeInsets.all(20),
      child: Row(
          children: groupedTransactionValues.map((data) {
        return ChartBar(
          data['day'],
          // Error: The argument type 'Object?' can't be assigned to the parameter type 'String'.
          data['amount'],
          // Error: The argument type 'Object?' can't be assigned to the parameter type 'String'.
          (data['amount'] as double) / totalSpending,
        );
      }).toList()));
    }
  }
  </code></pre>
  <p>I dont know where did I go wrong</p>