Chat / Flutter
Current version: v3
Chat Flutter v3
Chat Flutter
Chat
Flutter
Home
/
Chat
/
Flutter
/
Channel

When a user is online, all data associated with the group channels they are a member of are automatically updated by the SendbirdSdk instance. However, when a user is disconnected from the Sendbird server and reconnects later, you should call the refresh() method to update the channels with the latest information.

try {
    final channel = await groupChannel.refresh();
} catch (e) {
    // Handle error.
}

Note: If you want to provide the updated channels with the latest information when your user's app is in the foreground, call refresh() in the onReconnectionSucceeded() method which receives a callback from the Sendbird server when successfully reconnected.