@@ -70,8 +70,11 @@ abstract class IntercomFlutterPlatform extends PlatformInterface {
7070 ///
7171 /// You can register a identified user either with [userId] or with [email] ,
7272 /// but not with both.
73- Future <void > loginIdentifiedUser (
74- {String ? userId, String ? email, IntercomStatusCallback ? statusCallback}) {
73+ Future <void > loginIdentifiedUser ({
74+ String ? userId,
75+ String ? email,
76+ IntercomStatusCallback ? statusCallback,
77+ }) {
7578 throw UnimplementedError ('loginIdentifiedUser() has not been implemented.' );
7679 }
7780
@@ -80,7 +83,8 @@ abstract class IntercomFlutterPlatform extends PlatformInterface {
8083 /// track their activity in your app.
8184 Future <void > loginUnidentifiedUser ({IntercomStatusCallback ? statusCallback}) {
8285 throw UnimplementedError (
83- 'loginUnidentifiedUser() has not been implemented.' );
86+ 'loginUnidentifiedUser() has not been implemented.' ,
87+ );
8488 }
8589
8690 /// Updates the attributes of the current Intercom user.
@@ -117,7 +121,8 @@ abstract class IntercomFlutterPlatform extends PlatformInterface {
117121 /// To hide or show the standard launcher on the bottom right-hand side of the screen.
118122 Future <void > setLauncherVisibility (IntercomVisibility visibility) {
119123 throw UnimplementedError (
120- 'setLauncherVisibility() has not been implemented.' );
124+ 'setLauncherVisibility() has not been implemented.' ,
125+ );
121126 }
122127
123128 /// You can check how many unread conversations a user has
@@ -126,13 +131,15 @@ abstract class IntercomFlutterPlatform extends PlatformInterface {
126131 /// You can get the current unread conversation count with this method.
127132 Future <int > unreadConversationCount () {
128133 throw UnimplementedError (
129- 'unreadConversationCount() has not been implemented.' );
134+ 'unreadConversationCount() has not been implemented.' ,
135+ );
130136 }
131137
132138 /// To allow or prevent in app messages from popping up in certain parts of your app.
133139 Future <void > setInAppMessagesVisibility (IntercomVisibility visibility) {
134140 throw UnimplementedError (
135- 'setInAppMessagesVisibility() has not been implemented.' );
141+ 'setInAppMessagesVisibility() has not been implemented.' ,
142+ );
136143 }
137144
138145 /// To open the Intercom messenger.
@@ -167,7 +174,8 @@ abstract class IntercomFlutterPlatform extends PlatformInterface {
167174 /// The [collectionIds] you want to display.
168175 Future <void > displayHelpCenterCollections (List <String > collectionIds) {
169176 throw UnimplementedError (
170- 'displayHelpCenterCollections() has not been implemented.' );
177+ 'displayHelpCenterCollections() has not been implemented.' ,
178+ );
171179 }
172180
173181 /// To display an Activity with your Messages content.
@@ -195,7 +203,8 @@ abstract class IntercomFlutterPlatform extends PlatformInterface {
195203 ///
196204 /// When you want Intercom to act on that data, use this method.
197205 @Deprecated (
198- "Calling this API is no longer required. Intercom will directly open the chat screen when a push notification is clicked." )
206+ "Calling this API is no longer required. Intercom will directly open the chat screen when a push notification is clicked." ,
207+ )
199208 Future <void > handlePushMessage () {
200209 throw UnimplementedError ('handlePushMessage() has not been implemented.' );
201210 }
@@ -204,7 +213,8 @@ abstract class IntercomFlutterPlatform extends PlatformInterface {
204213 /// field pre-populated.
205214 Future <void > displayMessageComposer (String message) {
206215 throw UnimplementedError (
207- 'displayMessageComposer() has not been implemented.' );
216+ 'displayMessageComposer() has not been implemented.' ,
217+ );
208218 }
209219
210220 /// To check if the push [message] is for Intercom or not.
@@ -278,7 +288,8 @@ abstract class IntercomFlutterPlatform extends PlatformInterface {
278288 /// Retrieve the details of the currently logged in user.
279289 Future <Map <String , dynamic >> fetchLoggedInUserAttributes () {
280290 throw UnimplementedError (
281- 'fetchLoggedInUserAttributes() has not been implemented.' );
291+ 'fetchLoggedInUserAttributes() has not been implemented.' ,
292+ );
282293 }
283294
284295 /// JWT (JSON Web Token) is the recommended method to secure your Messenger.
@@ -295,4 +306,23 @@ abstract class IntercomFlutterPlatform extends PlatformInterface {
295306 Future <void > setAuthTokens (Map <String , String > tokens) {
296307 throw UnimplementedError ('setAuthTokens() has not been implemented.' );
297308 }
309+
310+ /// Changes the Intercom workspace.
311+ ///
312+ /// On Android: Uses native changeWorkspace API (SDK 16.1.0+)
313+ /// On iOS: Logs out and re-initializes with new credentials
314+ ///
315+ /// This will logout the current user and clear all SDK data.
316+ /// You must call login again after changing workspace.
317+ ///
318+ /// [appId] is required for both platforms.
319+ /// [androidApiKey] is required for Android.
320+ /// [iosApiKey] is required for iOS.
321+ Future <void > changeWorkspace (
322+ String appId, {
323+ String ? androidApiKey,
324+ String ? iosApiKey,
325+ }) {
326+ throw UnimplementedError ('changeWorkspace() has not been implemented.' );
327+ }
298328}
0 commit comments