spect8_client 1.0.2
spect8_client: ^1.0.2 copied to clipboard
Official client for Spect8 chat services.Spect8-chat SDK for Flutter, adds an awesome expansion to Flutter's cross-platform applications.
Spect8-chat SDK for Flutter, adds an awesome expansion to Flutter's cross-platform applications for iOS, android and Web by enabling Real-Time Messaging, Polling, Merchandise selling and much more to its users. Platform's provided services are of high reliability, low latency, and high payout
Spect8_Client #
Introduction: #
A client initiates interactions with server. Purpose of the client is to make it convenient and possible for arbitrary code to formulate a request and attract the attention of the server. Client is responsible for APIs, Event Management and Web Sockets. Client acts as the main entry point for the SDK.
Package: #
The Spect8-chat SDK comprises of more than one package:
-
Spect8_client: #
This package contains all of the functionality necessary to include Real-Time Messaging into your application. It makes no attempt to provide business logic.
Installation: #
-
Add dependencies: #
Add the following dependencies to your project as per your requirement in pubspec.yaml file:
dependencies:
spect8_client: ^1.0.1
-
Download dependency: #
Install packages from the command line
$ flutter pub get
2.5.Accessing Package #
Import packages with following commands
import 'package:spect8_client/spect8_client.dart';
2.6.Initialize the Chat SDK: #
In order to use chat client one has to be authenticated and for authentication it is a necessity to initialize the client.
final spect8Client = Spect8Client();
-
User authentication: #
A user can be anyone viewing content. Successfull authentication returns a TenantManager object which is used for all the operations other than authentication.
Future<void> main() async {
final spect8Client = Spect8Client();
TenantManager tenantManager = await spect8Client.connectDemoUser(
demoUserId: 'some-user-id',
tenantId: 'id-of-tenant',
);
}
3-Managers-Flow-Diagram: #
In order to accomplish various operations we provide handy mangers.
-
Tenant_manager
-
Broadcast_manager
-
Shop_Category_manager
-
Disclaimer_manager
-
Report_manager
-
Channel_manager
-
Poll_manager
-
Shop_Item_manager