📜  listviewbuilder flutter firebase - 任何代码示例

📅  最后修改于: 2022-03-11 14:57:28.095000             🧑  作者: Mango

代码示例1
return new ListView.builder( 
    scrollDirection: Axis.vertical, 
    itemCount: snapshot.data.documents.length, 
    itemBuilder: (context, index) { 
        if (index == 0) {
            return someWidget, // return the widget you want as "header" here
        } else {
           return _buildList( context, snapshot.data.documents[index-1]), 
        }
    }
);