复选框错误:位置参数太少:

问题描述 投票:0回答:1
 new Checkbox (
        onChanged: (bool resp)
        {
         setState(() {
          _sel=resp;

         });
        },
        value: _sel,
      ),
button checkbox dart flutter
1个回答
0
投票

来自https://docs.flutter.io/flutter/material/Checkbox-class.html

enter image description here

您需要传递所需的参数value

© www.soinside.com 2019 - 2024. All rights reserved.