octopus_sdk_flutter library

Classes

ActivityScreen
The connected user's community activity screen — their posts (1.13+).
ActivityScreenInfo
Info needed to display one member's activity screen (posts, plus comments when the community enables them).
ApiServer
Server endpoint the SDK targets at initialization time.
ClientPost
A client object (article, product, recipe, event, …) to link to an Octopus post.
ClientPostAlreadyExistsError
A bridge post already exists for this client object.
ClientPostError
Typed errors returned by OctopusSDK.fetchOrCreateClientObjectRelatedPost inside an OctopusInvalidArguments.
ClientPostFileBadFormatError
The provided image format is unsupported or corrupted.
ClientPostFileDownloadError
Downloading the remote image failed.
ClientPostFileEmptyError
The provided image file is empty.
ClientPostFileTooLargeError
The provided image exceeds the maximum allowed size.
ClientPostFileUploadError
Uploading the image failed.
ClientPostInvalidAuthorError
The author is not authorized to create posts for this object.
ClientPostInvalidGroupIdError
The specified group id is invalid or unavailable.
ClientPostMissingCtaError
The view-object button text (call to action) is missing when required.
ClientPostMissingObjectIdError
The client object id is missing or empty.
ClientPostNotFoundError
No bridge post exists yet for this client object.
ClientPostOtherError
An unspecified or unrecognized error. Carries the native-provided errorMessage. On iOS, validation failures surface here.
ClientPostTextMissingError
The post text is missing or empty.
ClientPostTextTooLongError
The post text exceeds the maximum character limit.
ClientPostTokenExpiredError
The authentication token (bridge signature) has expired.
ClientPostTokenInvalidError
The authentication token (bridge signature) is invalid or malformed.
ClientPostUnavailableError
The bridge post exists but is unavailable (e.g. moderated or deleted).
ClientUserBannedError
The user is banned from the community.
ClientUserCommunityAccessDeniedError
The backend refused this user access to the community.
ClientUserError
Typed errors returned by OctopusSDK.connectUser inside an OctopusInvalidArguments.
ClientUserInvalidTokenError
The JWT was refused: malformed, expired, or signed with the wrong key.
ClientUserMissingTokenError
No token was available for the connection: the tokenProvider returned an empty string, threw, or did not answer in time.
ClientUserOtherError
Any other connection refusal reported by the native SDK.
ClientUserProfileError
The profile carried by the connection was rejected (nickname, bio or picture failed validation).
CommentButtonClickedEvent
CommentCreatedEvent
CommentDetailScreen
CommentOptions
Per-content-type options governing what members may add when creating a comment.
ContentDeletedEvent
ContentOptions
Per-content-type options governing what members may add when creating content.
ContentReportedEvent
CreatePostScreen
CreatePostScreenInfo
Info needed to open the Octopus post editor as an SDK entry point (Bridge Share).
DeleteAccountScreen
Legacy screen event retained for compatibility with earlier SDK versions.
EditProfileScreen
GamificationPointsGainedEvent
GamificationPointsRemovedEvent
GroupDetailScreen
The group details screen — the posts feed of a single group (1.11+).
GroupFollowingChangedEvent
Emitted when the current user follows or unfollows a group (1.11+).
GroupFollowUnfollowError
Typed errors returned by OctopusSDK.followGroup / OctopusSDK.unfollowGroup inside an OctopusInvalidArguments.
GroupFollowUnfollowGroupAlreadyFollowedError
The connected user already follows the group — server state unchanged.
GroupFollowUnfollowGroupAlreadyUnfollowedError
The connected user already does not follow the group — server state unchanged.
GroupFollowUnfollowLastFollowedGroupError
Returned by OctopusSDK.unfollowGroup when the user attempts to unfollow their last followed group. A user must always have at least one followed group (counting both voluntarily-followed and force-followed groups). This guard matches the behaviour of the built-in Octopus SDK UI.
GroupFollowUnfollowMissingGroupError
No group exists with the given id.
GroupFollowUnfollowUnfollowableGroupError
The group is not followable / not unfollowable (e.g. admin-restricted, or an essential/force-followed group that cannot be unfollowed).
GroupFollowUnfollowUnknownError
An unclassified backend error occurred.
GroupScreenInfo
Info needed to display a single group's feed.
GroupsScreen
The groups list screen (1.11+).
MainFeedScreen
The main posts feed screen (1.11+).
NotificationClickedEvent
OctopusClapReaction
👏 reaction.
OctopusClientPostAttachment
An image attachment for a ClientPost.
OctopusCommentCreationIcons
Actions for opening the comment composer, sending text and attaching pictures.
OctopusCommentIcons
Comment actions and legacy empty-comment illustrations.
OctopusCommonIcons
Shared navigation, activity and two-state control icons.
OctopusCommunityData
A read-only snapshot of a member's public Octopus community activity.
OctopusConnected
A user is connected. The connection may be a regular authenticated user or an anonymous guest — see isGuest.
OctopusConnectionFailure
A failure with no typed error — a transport- or auth-level problem.
OctopusConnectionState
Reactive snapshot of the SDK's user-connection state.
OctopusConsentTexts
Community consent wordings forwarded unchanged to native SDK 1.15.
OctopusContentIcons
Icons for posts, comments, replies, media and content actions.
OctopusContentUnavailable
The requested content is unavailable.
OctopusCryReaction
😢 reaction.
OctopusDebugCommunityConfig
Debug-only snapshot of the community config the native SDK currently holds (the backend's GetConfig response, with any local debugOverride* applied on top — the same effective config the SDK UI consumes).
OctopusEvent
OctopusFailure<E extends OctopusServerError>
A failed OctopusResult.
OctopusGamification
A member's gamification standing inside the community.
OctopusGamificationIcons
Badges and actions in the levels and gamification rules screens.
OctopusGroup
A group (content category) in the Octopus community.
OctopusGroupDetailsScreen
A Flutter widget that opens a single group's feed in the native Octopus UI in bridge mode — the user cannot navigate to other groups or the main community feed from this entry point.
OctopusGroupsIcons
Icons for choosing a group and navigating to its contents.
OctopusHeartReaction
❤️ reaction.
OctopusHomeContent
Embedded variant of OctopusHomeScreen that omits the native SDK navigation chrome (top app bar) so the host app can render its own.
OctopusHomeScreen
A Flutter widget that displays the native Octopus UI embedded within your Flutter app.
OctopusIconOnOff
The complete on/off images of a radio button, checkbox or toggle.
OctopusIcons
Optional icon overrides; omitted slots retain the native defaults. Names follow iOS OctopusTheme.Assets.Icons. Pass to OctopusTheme.icons.
OctopusIconSource
An image for a native icon or screen-state illustration. Tinted icons need transparency (PNG/WebP with an alpha channel, not JPEG).
OctopusInitialScreen
The initial screen to display when the embedded Octopus UI mounts.
OctopusInitialScreenActivity
One member's activity screen (posts, plus comments when the community enables them). See OctopusInitialScreen.activity.
OctopusInitialScreenCreatePost
The post editor as the initial screen. See OctopusInitialScreen.createPost.
OctopusInitialScreenGroup
A specific group detail screen entry. See OctopusInitialScreen.group.
OctopusInitialScreenMainFeed
The main feed screen with the feed selector. See OctopusInitialScreen.mainFeed.
OctopusInitialScreenPost
A specific post detail screen entry. See OctopusInitialScreen.post.
OctopusInitialScreenProfile
A member's profile screen. See OctopusInitialScreen.profile.
OctopusInvalidArguments<E extends OctopusServerError>
One or more typed validation/business errors.
OctopusJoyReaction
😂 reaction.
OctopusLocalImageAttachment
A local image attachment carrying the raw image bytes (e.g. JPEG/PNG).
OctopusMouthOpenReaction
😮 reaction.
OctopusNoNetwork
No network connection was available.
OctopusNotConnected
No user is currently connected to the Octopus platform.
OctopusNotification
Represents a push notification from the Octopus Community platform.
OctopusPermissionDenied
The user lacks permission for the operation.
OctopusPollIcons
The selection indicator for a poll option.
OctopusPost
A read-only view of an Octopus post.
OctopusPostCreationIcons
Actions in the native post composer, including pictures and polls.
OctopusPostCTA
A call-to-action button attached to a post published through the Bridge create-post flow (e.g. a prefilled post — see OctopusPrefilledPost).
OctopusPostDetailsScreen
A Flutter widget that opens a single post in the native Octopus UI in bridge mode — the user cannot navigate to other posts or the main community feed from this entry point.
OctopusPostIcons
Post actions and legacy empty-feed illustrations.
OctopusPrefilledPost
A payload that prefills the Octopus post editor when the host opens the SDK on the create-post screen (Bridge Share).
OctopusProfile
The public-facing profile of the connected user.
OctopusProfileIcons
Profile editing actions and legacy profile illustrations.
OctopusProfileScreen
A Flutter widget that opens a member's Octopus profile — or, with clientUserId left null, the connected user's own profile — without going through the community feed.
OctopusRageReaction
😡 reaction.
OctopusReactionCount
The number of reactions of a given reactionKind on a post.
OctopusReactionIcons
The six reaction images, rendered in their original colors without tinting.
OctopusReactionKind
A reaction kind that can be set on a post via OctopusSDK.setReaction.
OctopusRemoteImageAttachment
A remote image attachment pointing at a url the backend fetches directly. The URL must point to the image file itself.
OctopusReplyCreationIcons
Actions for opening the reply composer, sending text and attaching pictures.
OctopusReplyIcons
Reply composition and like-button icons.
OctopusResult<D, E extends OctopusServerError>
The outcome of an SDK operation that can fail in a typed way.
OctopusScreenStateIcons
Full-color, untinted illustrations shown for empty screens and failed loads.
OctopusSDK
OctopusServerError
Marker interface for the typed errors carried by OctopusInvalidArguments.
OctopusSettingsIcons
Icons for help and information actions.
OctopusStatusError
The server returned an error status.
OctopusSuccess<D, E extends OctopusServerError>
A successful OctopusResult carrying data.
OctopusTheme
Class to customize the appearance of the Octopus interface
OctopusUnknownReaction
A reaction kind the SDK does not recognize, typically coming from a more up-to-date backend. serverValue carries the raw identifier (the unicode emoji string) so it can be displayed or round-tripped.
OctopusUserNotAuthenticated
The user is not authenticated.
OctopusVideoIcons
Playback and sound controls in the native video player.
OtherUserPostsScreen
Another member's community activity screen — their posts (1.13+).
OtherUserProfileScreen
OverrideCommunityAccessError
Typed errors returned by OctopusSDK.overrideCommunityAccess inside an OctopusInvalidArguments.
OverrideCommunityAccessUnknownError
An unspecified error while overriding community access.
PollVotedEvent
PostClickedEvent
PostCreatedEvent
PostDetailScreen
PostOptions
Per-content-type options governing what members may add when creating a post.
PostScreenInfo
Info needed to display a single post.
PostsFeedScreen
ProfileFieldsLock
Per-field profile lock for the current community.
ProfileModifiedEvent
ProfileReportedEvent
ProfileScreen
ReactionModifiedEvent
RefreshEntitlementsError
Typed errors returned by OctopusSDK.refreshEntitlements inside an OctopusInvalidArguments.
RefreshEntitlementsNoClientTokenProviderError
No token provider has been registered through OctopusSDK.connectUser yet. Reconnect a restored session with a token provider before refreshing.
RefreshEntitlementsNoNetworkError
No network connection was available.
RefreshEntitlementsServerError
The backend returned a generic error.
RefreshEntitlementsUserBannedError
The user has been banned. errorMessage is the backend-provided message and is appropriate for direct display.
RefreshEntitlementsUserNotConnectedError
No connected (non-guest) user; connect a user first.
ReplyButtonClickedEvent
ReplyCreatedEvent
ReplyOptions
Per-content-type options governing what members may add when creating a reply.
ReportContentScreen
ReportExplanationScreen
ReportProfileScreen
Screen
ScreenDisplayedEvent
SeeRepliesButtonClickedEvent
SessionStartedEvent
SessionStoppedEvent
SetReactionError
Typed errors returned by OctopusSDK.setReaction inside an OctopusInvalidArguments.
SetReactionPostNotFoundError
The post with the given id was not found, or the current user has no read access to it.
SetReactionReactionError
An error occurred while setting the reaction on the server. On iOS this also covers the native serverError/other cases.
SetReactionUnknownReactionError
An unknown reaction kind was passed (an OctopusUnknownReaction). Only the known reaction kinds are supported by the backend.
SettingsAccountScreen
Legacy screen event retained for compatibility with earlier SDK versions.
SettingsListScreen
Legacy screen event retained for compatibility with earlier SDK versions.
SyncFollowGroupAction
A single follow/unfollow action to sync for a group, with its own timestamp.
SyncFollowGroupResult
The per-action outcome returned by the backend.
TranslationButtonClickedEvent
UnknownEvent
Fallback for event types added in newer native SDK versions or when parsing fails due to malformed data from the native side.
UnknownScreen
Fallback for screen types added in newer native SDK versions.
ValidateNicknameScreen

Enums

ApiServerValidationErrorKind
The specific reason an ApiServer host failed validation.
ContentKind
GamificationPointsGainedAction
GamificationPointsRemovedAction
GroupDetailSource
Source from which a GroupDetailScreen was opened.
OctopusConsentTextsMode
The three native consent wording variants, independent of acceptance mode.
OctopusNavBarLeadingAction
A host-driven leading nav-bar item the SDK renders on its root screen — the screen selected by OctopusHomeScreen.initialScreen (the main feed, or a bridge post / group).
OctopusNavigationMode
Selects which navigation container the native iOS OctopusHomeScreen uses internally for its sub-navigation (opening a post, a group, a profile, …).
OctopusThemeMode
Enum for theme mode options
PostClickedSource
PostContent
ProfileField
Profile fields that can be managed by your app instead of Octopus Community.
ProfileFieldLockState
Per-field editability status of a profile field, driven by the community configuration.
ReactionKind
ReportReason
SyncFollowGroupStatus
The outcome status for a single action inside a sync batch.
TermsAcceptanceMode
How users must accept the legal documents (terms, privacy policy, community rules) at their first contribution.
UrlOpeningStrategy
Strategy for handling URLs tapped inside the Octopus Community UI.

Extensions

OctopusResultExtensions on OctopusResult<D, E>
Functional helpers on OctopusResult, mirroring the native extension API.

Functions

formatOctopusCompactCount(int count, {Locale? locale}) → String
Formats count as a compact, human-readable string in the same style as the embedded community UI on both native platforms: 0–999 raw, then K / M / B for thousands / millions / billions.

Exceptions / Errors

ApiServerValidationError
Thrown by the ApiServer constructor when ApiServer.host is invalid.
OctopusPrefilledPostContentEmptyError
Retained for backward compatibility, and never thrown: text and image are both optional, so an empty payload no longer fails. Kept only so existing switch statements over OctopusPrefilledPostValidationError stay exhaustive — mirrors the native SDKs, which kept their ContentEmpty case for the same reason.
OctopusPrefilledPostCtaLabelEmptyError
The attached OctopusPostCTA has an empty or whitespace-only label.
OctopusPrefilledPostCtaUrlEmptyError
The attached OctopusPostCTA has an empty or whitespace-only url string.
OctopusPrefilledPostTextTooLongError
The text length exceeds OctopusPrefilledPost.textMaxLength.
OctopusPrefilledPostTextTooShortError
The text length is below OctopusPrefilledPost.textMinLength.
OctopusPrefilledPostValidationError
A validation failure thrown by the OctopusPrefilledPost constructor.