【问题标题】:Flutter: I can I build a list with different elements ex: a card with a text and a switch, an other card with a text and a sliderFlutter:我可以建立一个包含不同元素的列表,例如:一张带有文本和开关的卡片,另一张带有文本和滑块的卡片
【发布时间】:2021-08-20 16:42:01
【问题描述】:

我想创建一个包含不同元素的列表,例如:一张带有文本和开关的卡片,另一张带有文本和滑块的卡片。 我一直在寻找如何做到这一点一周,但我找不到。你能帮帮我吗?

【问题讨论】:

  • 列表 列表;

标签: flutter dart listview


【解决方案1】:

你可以定义一个Widgets list this

List<Widget> list = [ItemWithCard(),ItemWithSwitch()]; 

【讨论】:

    猜你喜欢
    • 2018-12-22
    • 1970-01-01
    • 2020-05-31
    • 2021-02-28
    • 2022-12-04
    • 2018-08-02
    • 2023-02-07
    • 2021-07-21
    • 1970-01-01
    相关资源
    最近更新 更多