/ SDKs / Flutter
SDKs
Chat SDKs Flutter v4
Chat SDKs Flutter
Chat SDKs
Flutter
Version 4

When a user is online, all data associated with the group channels automatically updated by the Chat SDK. 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 groupChannel = await GroupChannel.refresh('CHANNEL_URL');
} 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 onReconnectSucceeded() method which receives a callback from the Sendbird server when successfully reconnected.