Skip to content

Commit

Permalink
add null check
Browse files Browse the repository at this point in the history
  • Loading branch information
imtoori committed Jun 29, 2021
1 parent dde047b commit ba927bf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,10 @@ class MessageSearchListCoreState extends State<MessageSearchListCore> {
}

void _setupController() {
widget.messageSearchListController!.loadData = loadData;
widget.messageSearchListController!.paginateData = paginateData;
if (widget.messageSearchListController != null) {
widget.messageSearchListController!.loadData = loadData;
widget.messageSearchListController!.paginateData = paginateData;
}
}

@override
Expand Down
6 changes: 4 additions & 2 deletions packages/stream_chat_flutter_core/lib/src/user_list_core.dart
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,10 @@ class UserListCoreState extends State<UserListCore>
}

void _setupController() {
widget.userListController!.loadData = loadData;
widget.userListController!.paginateData = paginateData;
if (widget.userListController != null) {
widget.userListController!.loadData = loadData;
widget.userListController!.paginateData = paginateData;
}
}

@override
Expand Down

0 comments on commit ba927bf

Please sign in to comment.