【问题标题】:A non-null String must be provided to a Text widget Flutter Api必须向 Text 小部件 Flutter Api 提供非空字符串
【发布时间】:2020-11-18 21:26:44
【问题描述】:

容器( 孩子:文本(数据[索引] ['vote_average'])

Vote_avarage 是一个整数。

【问题讨论】:

    标签: api flutter


    【解决方案1】:

    你可以试试

    Container( child: Text(data[index]['vote_average'].toString())
    

    【讨论】:

      【解决方案2】:

      我认为根据标题:“A non-null String must be provided to a Text widget Flutter Api”,问题可能是data[index]['vote_average']返回null .

      你可以考虑调试数据对象:)

      【讨论】:

        猜你喜欢
        • 2020-04-14
        • 2021-01-28
        • 1970-01-01
        • 2021-07-19
        • 1970-01-01
        • 1970-01-01
        • 2021-02-14
        • 2021-03-03
        相关资源
        最近更新 更多