view360_chat 1.0.9 copy "view360_chat: ^1.0.9" to clipboard
view360_chat: ^1.0.9 copied to clipboard

A Dart package for chat socket connection and messaging API for implimenting view360 chat feature.

view360_chat #

A Flutter package that enables seamless integration of View360 chat functionality through real-time socket connection and messaging APIs. This package is ideal for apps that need a customer chat widget with features like file sharing, message delivery, and live socket-based communication.


๐Ÿงฉ Features #

  • ๐Ÿ”Œ Socket connection to View360's chat server.
  • ๐Ÿ’ฌ Send customer messages with optional file attachments.
  • ๐Ÿ“ฅ Fetch all messages in a chat conversation.
  • ๐Ÿงพ Built-in support for customer info (name, email, phone).
  • ๐Ÿ”ง Easy to configure with your base URL and app ID.

๐Ÿ’ป Full Example #

import 'package:view360_chat/view360_chat.dart';

void main() async {
  final socketManager = SocketManager();

  socketManager.connect(
    baseUrl: 'https://yourdomain.com',
    onMessage: (content, files, response) {
      print('๐Ÿ“ฉ New message: $content');
    },
  );

  final chatService = ChatService(
    baseUrl: 'yourdomain.com',
    appId: 'your-app-id',
  );

  final response = await chatService.sendChatMessage(
    chatContent: 'Hello from Flutter!',
    chatId: 'abc123',
    socketId: socketManager.socket.id!,
    customerName: 'John Doe',
    customerEmail: 'john@example.com',
    customerPhone: '1234567890',
  );

  final history = await chatService.fetchMessages(customerId: 'abc123');

  if (history.success) {
    print('๐Ÿ’ฌ Chat History: ${history.messages}');
  } else {
    print('โŒ Error: ${history.error}');
  }
}




1
likes
0
points
179
downloads

Publisher

unverified uploader

Weekly Downloads

A Dart package for chat socket connection and messaging API for implimenting view360 chat feature.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, http, http_parser, socket_io_client

More

Packages that depend on view360_chat