【问题标题】:how to disable elevatedbutton based on the api response in flutter?如何根据颤动中的api响应禁用提升按钮?
【发布时间】:2022-07-06 14:43:58
【问题描述】:

我是 Flutter 新手,谁能告诉我如何根据 API 响应启用/禁用提升按钮。我需要知道我的项目。谢谢

【问题讨论】:

标签: flutter


【解决方案1】:

你遵守这条规则

If onPressed and onLongPress callbacks are null, then the button will be disabled.

【讨论】:

  • 根据您的问题,我还需要 api 响应以在提升按钮中设置逻辑
猜你喜欢
  • 1970-01-01
  • 2023-03-10
  • 2023-03-29
  • 2022-01-13
  • 2021-07-19
  • 2012-03-15
  • 1970-01-01
  • 2022-12-31
  • 2017-06-30
相关资源
最近更新 更多