VChatController class

Represents a controller for VChat.

It must be initialized before used using init method. After it's initialized, it can be accessed using the I getter.

Example:

await VChatController.init(...)
final i = VChatController.I;

Properties

blockApi ↔ Block
Block API instance
latefinal
hashCode int
The hash code for this object.
no setterinherited
nativeApi VNativeApi
Native API instance
latefinal
nativeLocalMessage → NativeLocalMessage
shortcut for VChatController.I.nativeApi.local.message
no setter
nativeLocalRoom → NativeLocalRoom
shortcut for VChatController.I.nativeApi.local.room
no setter
nativeStreams VStreams
shortcut for VChatController.I.nativeApi.streams
no setter
The navigation context based on the navigator key.
no setter
Navigator key
latefinal
profileApi ↔ VProfileApi
Profile API instance
latefinal
roomApi ↔ RoomApi
Room API instance
latefinal
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sharedPreferences → SharedPreferences
no setter
vChatConfig VChatConfig
VChat configuration instance
getter/setter pair
vNavigator VNavigator
Navigator instance
latefinal

Methods

connectToSocket() bool
Connects to the socket if there is an access token. Otherwise, logs a warning and returns false. This method assumes you've already logged in.
dispose() → void
Sets _isControllerInit to false indicating that the controller is not initialized.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
updateConfig(VChatConfig chatConfig) → void
Updates the chat configuration.
updateLanguageCode(String languageCode) Future<void>
Updates the language code in the app preferences.

Operators

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

Static Properties

I VChatController
Returns the singleton instance of VChatController. It should be accessed only after calling init, otherwise it'll throw an error.
no setter

Static Methods

init({required VChatConfig vChatConfig, required VNavigator vNavigator, required GlobalKey<NavigatorState> navigatorKey}) Future<VChatController>
Initialize the VChatController instance.