AppwinCommunityPlatform class abstract

Contract each platform implements.

Host apps go through AppwinCommunity.instance instead. It is public so a platform package, or a test, can provide its own instance.

Inheritance
  • Object
  • PlatformInterface
  • AppwinCommunityPlatform
Implementers

Constructors

AppwinCommunityPlatform()
Constructs an implementation, registering the token that PlatformInterface uses to reject subclasses built by other means.

Properties

events → Stream<AppwinCommunityEvent>
The member's own actions. See AppwinCommunity.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
unreadNotificationCountStream → Stream<int>
The live unread count. See AppwinCommunity.unreadNotificationCountStream.
no setter

Methods

getPlatformVersion() → Future<String?>
Host OS and version, for checking the bridge is alive. See AppwinCommunity.getPlatformVersion.
initialize() → Future<AppwinInitResult>
Initialises the SDK. baseUrl serves development, to point at a local API. locale ; en prod, laisser null. Whether this app may use Community. See AppwinCommunity.initialize.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
openPost(String postId, {String? commentId}) → Future<void>
Opens a post, and optionally a reply thread. See AppwinCommunity.openPost.
presentCommunity({ProfileEditingHandlers profileEditing = const ProfileEditingHandlers()}) → Future<void>
Presents the community full screen over the app.
setHostCallbacks({void onNotificationTap(AppwinCommunityPostTarget target)?}) → Future<void>
Installs the host's handler, or removes it when null, and tells the native SDK whether it exists. See AppwinCommunity.onNotificationTap.
setProfileEditing(int viewId, ProfileEditingHandlers? handlers) → void
Registers the profile editing handlers of a native view, by platform view id, or removes them when null. See AppwinCommunityView.onEditProfile.
setUser({String? nickname, String? avatarUrl, String? bio}) → Future<AppwinCommunityUser?>
Pushes the identity the host app knows to the community profile. Pushes nickname, photo and bio. See AppwinCommunity.setUser.
toString() → String
A string representation of this object.
inherited
unreadNotificationCount() → Future<int>
Unread notifications, for a badge on the tab. Unread count for a badge. See AppwinCommunity.unreadNotificationCount.

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Properties

instance ↔ AppwinCommunityPlatform
The implementation in use, method channel by default.
getter/setter pair