SupportPortal class
Main entry point for the Support Portal Flutter SDK.
SupportPortal.init(SupportPortalConfig(
domain: 'mycompany',
platformId: 'plt_abc',
appId: 'app_xyz',
apiUrl: 'https://api.example.com',
));
SupportPortal.setUser(SupportPortalUser(externalId: 'user_123', name: 'John'));
SupportPortal.setCustomFields({'level': 42, 'plan': 'premium'});
SupportPortal.openConversations(context);
Properties
- config ↔ SupportPortalConfig?
-
getter/setter pair
-
customFields
↔ Map<
String, dynamic> -
getter/setter pair
-
events
→ Stream<
Map< String, dynamic> > -
Stream of all SDK events.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
getter/setter pair
- unreadCount ↔ int
-
getter/setter pair
- user ↔ SupportPortalUser?
-
getter/setter pair
Methods
-
dispatchEvent(
Map< String, dynamic> event) → void - Dispatch an event from the bridge to all listeners.
-
dispose(
) → void -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → SupportPortal
-
final
Static Methods
-
getUnreadCount(
) → int -
init(
SupportPortalConfig config) → void -
openConversation(
BuildContext context, String ticketId) → void -
openConversations(
BuildContext context) → void -
openHelpCenter(
BuildContext context, {String? slug, String? path, String? tenantSlug, String? appSlug, String? articleId, String? locale}) → void -
openNewConversation(
BuildContext context, {String? subject, String? conversationPrefillText, String? initialUserMessage}) → void -
setCustomFields(
Map< String, dynamic> fields) → void -
setTags(
List< String> newTags) → void -
setUser(
SupportPortalUser user) → void
Constants
- sdkVersion → const String