【发布时间】:2022-12-31 14:20:33
【问题描述】:
在我的代码中,我从数据库中获取数据并像这样在 UI 中显示。
代码
输出界面
我想将其传递给布尔变量,如果为真,则应激活加入按钮
布尔变量
bool active = data![index].doctor_in.toString();
错误
加入按钮
如何在 flutter 中将字符串变量传递给布尔变量(“活动”变量)?
【问题讨论】:
标签: flutter
在我的代码中,我从数据库中获取数据并像这样在 UI 中显示。
代码
输出界面
我想将其传递给布尔变量,如果为真,则应激活加入按钮
布尔变量
bool active = data![index].doctor_in.toString();
错误
加入按钮
如何在 flutter 中将字符串变量传递给布尔变量(“活动”变量)?
【问题讨论】:
标签: flutter
删除 bool active = data![index].doctor_in.toString() 中的 toString() 到 bool active = data![index].doctor_in
【讨论】: