flutter firebaseAnimatedList显示Firebase数据库记录

时间:2018-09-10 04:57:50

标签: database list firebase animation flutter

我正在使用firebaseAnimatedList显示firebase数据库记录,但是仅显示3条记录中的2条记录。请帮助解决此问题。

此处带有显示正文的代码。     小部件_showBody(){     返回列(       mainAxisAlignment:MainAxisAlignment.start,       crossAxisAlignment:CrossAxisAlignment.stretch,       孩子:[

Container(

            child: Flexible(
                  child: FirebaseAnimatedList(
                    query: databaseReference,
                    itemBuilder: (_, DataSnapshot snapshot,
                        Animation<double> animation, int index) {
                      return new Card(
                        color: Colors.brown,
                        child: ListTile(

                          title: Text(shopList[index].shopName),
                          subtitle: Text(shopList[index].address),
                        ),
                      );
                    },
                  ),

            ),
          ),
  ],
);

}

here -stackblitz live code sample

enter image description here

0 个答案:

没有答案