yohan park
yohan park

Reputation: 1

I created a chat using Firebase Stream Builder in Flutter, but the app crashed because there was too much data

I made a chat using Firebase Stream Builder on Flutter, but as the number of chats increases, the number of data calls up and it goes down. The future builder has data pageing, but the stream does not have pageing, so how is everyone else making it? Is there any other way other than limit?

App.db
 .collection("talk_content")
        .where("roomId", isEqualTo: roomId)
        .where("enable", isEqualTo: true)
        .orderBy("regdate", descending: true)
        .withConverter(fromFirestore: (data, _) {
      return ChatModel.fromJson(data.data()!, data.id);
    }, toFirestore: (josn, _) {
      return josn.toJson();
    }).snapshots();

Upvotes: 0

Views: 31

Answers (0)

Related Questions