小编Ahm*_*ody的帖子

Flutter 中接受多行的 .forEach

我正在尝试循环遍历调用的 flutter 中的数组,cart并且我需要执行多行,我不知道该怎么做

`Map<int, dynamic> cart = {77 => "ABC", 110 => "XYZ"};
cart.forEach((K,V) => {
    print(K);
    print(V);
});`
Run Code Online (Sandbox Code Playgroud)

为什么这不起作用?我想我错过了某个function地方

dart flutter

3
推荐指数
1
解决办法
3007
查看次数

标签 统计

dart ×1

flutter ×1