qichatsdk_flutter 1.1.0 copy "qichatsdk_flutter: ^1.1.0" to clipboard
qichatsdk_flutter: ^1.1.0 copied to clipboard

A useful Dart library for QiChat.

example/qichatsdk_flutter_example.dart

import 'package:qichatsdk_flutter/qichatsdk_flutter.dart';
import 'package:qichatsdk_flutter/src/ChatLib.dart';
import 'package:qichatsdk_flutter/src/LineDetect.dart';
import 'package:web_socket_channel/web_socket_channel.dart';

import 'MyChatListener.dart';

void main() {
  // Create an instance of ChatLib
  final chatLib = ChatLib();

  // Create an instance of your listener
  final listener = MyChatListener();

  // Assign the listener to the ChatLib delegate
  chatLib.delegate = listener;

  // Initialize the chat library with necessary parameters
  chatLib.initialize(
    userId: 230,
    cert: "COYBEAUYASDyASiG2piD9zE.te46qua5ha2r-Caz03Vx2JXH5OLSRRV2GqdYcn9UslwibsxBSP98GhUKSGEI0Z84FRMkp16ZK8eS-y72QVE2AQ",
    token: "",
    baseUrl: "wss://csapi.hfxg.xyz/v1/gateway/h5",
    sign: "9zgd9YUc",
  );

  // Now the listener will receive the delegate events
  chatLib.callWebSocket();
}
0
likes
0
points
5
downloads

Publisher

unverified uploader

Weekly Downloads

A useful Dart library for QiChat.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

circular_countdown_timer, fixnum, http, protobuf, uuid, web_socket_channel

More

Packages that depend on qichatsdk_flutter