I am trying to loop through an array in flutter called, cart and I need to execute multiple lines, I couldn't figure out how to do it
`Map<int, dynamic> cart = {77 => "ABC", 110 => "XYZ"};
cart.forEach((K,V) => {
    print(K);
    print(V);
});`
Why this wouldn't work? I think I am missing a function somewhere
Map<int, dynamic> cart = {77 : "ABC", 110 : "XYZ"};
cart.forEach((k, v) {
  print("$k: $v");
}); 
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With