chatasist_flutter 1.0.2 copy "chatasist_flutter: ^1.0.2" to clipboard
chatasist_flutter: ^1.0.2 copied to clipboard

Flutter plugin for embedding the Chatasist customer support chat widget with realtime messaging, media uploads, and voice/video call support.

Chatasist Flutter #

Native Flutter widget SDK for Chatasist chat with a simple initialize then present integration flow, fully powered by Chatasist Widget APIs.

Features #

  • Native chat UI (chat list, thread, composer)
  • Session bootstrap with JWT persistence
  • File/image/video/audio attachments (multipart to /api/widget/messages)
  • Realtime integration via Pusher (/api/widget/broadcasting/auth)
  • Voice/video call signaling support using WebRTC + widget call endpoints
  • Global plugin singleton + unread/incoming call notifiers

SDK and Platform Support #

  • SDK: Flutter package
  • Platforms: Android, iOS, Web (host app support depends on your app/plugin stack)
  • Tested package baseline:
    • Flutter 3.35+
    • Dart 3.11+

Requirements #

  • Flutter 3.35+
  • Backend endpoints under /api/widget/*
  • Required request header: X-Chatasist-Channel: {channel_uuid}
  • Optional identity support through /api/widget/session

Install #

dependencies:
  chatasist_flutter:
    path: ../chatasist-flutter

Quick start #

final navigatorKey = GlobalKey<NavigatorState>();

await chatasistFlutter.initialize(
  ChatasistWidgetOptions(
    baseUrl: 'https://chatasist.com',
    channelId: '00000000-0000-0000-0000-000000000001',
    language: 'en',
    navigatorKey: navigatorKey,
  ),
);

await chatasistFlutter.setIdentity('visitor@example.com');
await chatasistFlutter.present();

Usage #

Import package:chatasist_flutter/chatasist_flutter.dart and use the singleton:

import 'package:flutter/material.dart';
import 'package:chatasist_flutter/chatasist_flutter.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();

  final navigatorKey = GlobalKey<NavigatorState>();

  await chatasistFlutter.initialize(
    ChatasistWidgetOptions(
      baseUrl: 'https://chatasist.com',
      channelId: 'YOUR_WIDGET_CHANNEL_UUID',
      language: 'en',
      navigatorKey: navigatorKey,
    ),
  );

  runApp(MyApp(navigatorKey: navigatorKey));
}

Common runtime actions:

  • Initialize once at app startup.
  • Optionally set visitor identity using setIdentity.
  • Open the messenger using present.

Android Setup #

Ensure your Android app has required permissions for network, attachments, and call/media features.

Recommended permissions in AndroidManifest.xml:

<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>

Notes:

  • Keep AndroidX enabled in Gradle settings.
  • Confirm your app minSdk is compatible with transitive plugin requirements (especially media/WebRTC plugins).
  • Request runtime permissions where needed (camera, microphone, storage/media).

iOS Setup #

Add usage descriptions in Info.plist for features your app enables:

<key>NSCameraUsageDescription</key>
<string>Camera access is required for video calls.</string>
<key>NSMicrophoneUsageDescription</key>
<string>Microphone access is required for voice and video calls.</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Photo library access is required to attach media.</string>

Notes:

  • Ensure your iOS deployment target is compatible with dependency requirements.
  • Request permissions before launching related features.

Push Notification Setup #

This package handles in-app realtime via widget APIs/Pusher. For background push notifications, integrate native push infrastructure in the host app (for example firebase_messaging) and route notification taps into opening Chatasist.

Typical flow:

  1. Configure push notifications in your Flutter host app (firebase_messaging, APNS/FCM setup).
  2. Use your backend to deliver notification payloads for new widget messages/calls.
  3. On notification tap, call chatasistFlutter.present() to open the widget.

Current scope:

  • In-app realtime events are supported by this package.
  • Push token registration and push delivery orchestration are handled by your app/backend stack.

API #

  • initialize(ChatasistWidgetOptions options)
  • setIdentity(String? identity)
  • present({BuildContext? context})
  • dismiss()
  • refresh()
  • unreadCount (ValueNotifier<int>)
  • hasIncomingCall (ValueNotifier<bool>)

Backend endpoint mapping #

  • POST /api/widget/session
  • GET /api/widget/chats
  • GET /api/widget/chats/{id}
  • POST /api/widget/messages
  • POST /api/widget/broadcasting/auth
  • POST /api/widget/chats/{chat}/calls/start
  • POST /api/widget/chats/{chat}/calls/{call}/answer
  • POST /api/widget/chats/{chat}/calls/{call}/ice
  • POST /api/widget/chats/{chat}/calls/{call}/end

Reference #

0
likes
0
points
368
downloads

Publisher

verified publisherchatasist.com

Weekly Downloads

Flutter plugin for embedding the Chatasist customer support chat widget with realtime messaging, media uploads, and voice/video call support.

Homepage

License

unknown (license)

Dependencies

collection, file_picker, flutter, flutter_secure_storage, flutter_webrtc, http, http_parser, image_picker, mime, pusher_channels_flutter

More

Packages that depend on chatasist_flutter