The package is used to give a support or guidence to your customer.

It supports for both Mobile and web.

Features:

  1. chat support.
  2. Currently available only messages support.
  3. Supported for both Android and IOS.
  4. And also web and Desktop(All).

How to use

  • Initialize the api_key in main() function.

  • Login to Innostack web and generate the api_key.

  • It checks the user(who is using package) is registered or not and his premium status.

    void main() { ChatApiService.initApiKey("api_key"); runApp(const MyApp()); }

  • Use the below code to display ChatScreen

     ChatScreen(
         userId: customerId,
         userName: "customerName,(Optional)
         screenTitle: "Your App Name",
         chatSession: chatsession,
         onTyping: (bool) {
             // Your code to update user status of typing as boolean
         },
         onSendMessage: (message) {
             /* When send a message in the screen it will return a message as
             Message(
                 messageId : "32bit uid",
                 senderId: "customerId",
                 read: false,
                 senderType: SenderType.customer,
                 messageText: "your text",
                 createdAt: DateTime.now());
             Now you have to set 
                message.sessionId = sessionId;
                
             write code to upload message to server. */
         },
         appBarColor: Colors.red,(Optional)
         bodyColor: Colors.grey,(Optional)
         messageTileColor: Colors.white.withOpacity(0.3),(Optional)
     );
    

Libraries

chat_service