小编chi*_*aed的帖子

未定义命名参数“child”。尝试将名称更正为现有命名参数的名称

我有一个简单的对话框小部件,它在 beta 通道的 Windows 上运行良好,没有错误,但是当我在 MacBook 上拉相同的 repo 时,我以错误结束。两个环境都在测试版频道上

未定义命名参数“child”。尝试将名称更正为现有命名参数的名称,或使用名称“child”定义命名参数

我的对话。什么可能导致孩子抱怨child: new AlertDialog(

void _showDialog(
      BuildContext context, QRViewController controller, String result) async {
    await showDialog<String>(
      context: context,
      // FIXME: child isn't defined for this function. need to use right params
        child: new AlertDialog(
        contentPadding: const EdgeInsets.all(16.0),
        content: Container(
          height: 400,
          child: Column(
            children: [
              new Row(
                children: [
                  Text(
                    'Please record your body temperature \nin Celsius from the digital reading \non the infrared thermometer',
                  ),
                ],
              ),
              new …
Run Code Online (Sandbox Code Playgroud)

dart flutter

2
推荐指数
1
解决办法
1708
查看次数

标签 统计

dart ×1

flutter ×1