reinitializeAfterSession method
- @Deprecated('Not needed: the UI Kit keeps the Calls SDK initialised and logged in, ' 'and waitForCallsSdk() retries a failed init or login once. Use ' 'waitForCallsSdk() to wait for it. Will be removed in 7.0.0.')
Makes sure the Calls SDK is still initialised and logged in after a call session.
It used to reset the Calls SDK state and initialise and log in again after every call, even after logout. Now it only repairs what is missing: it initialises again when the plugin reports it is not initialised, and logs in again when the Calls SDK holds no login (or another user's). A failed init or login is retried once. It does nothing once call handling has stopped (logged out).
Implementation
@Deprecated(
'Not needed: the UI Kit keeps the Calls SDK initialised and logged in, '
'and waitForCallsSdk() retries a failed init or login once. Use '
'waitForCallsSdk() to wait for it. Will be removed in 7.0.0.',
)
Future<void> reinitializeAfterSession() async {
if (!CallsLifecycle.isStarted) return;
await CallsSdkSession.instance.ensureReady();
}