yalo_chat_flutter_sdk 0.0.3 copy "yalo_chat_flutter_sdk: ^0.0.3" to clipboard
yalo_chat_flutter_sdk: ^0.0.3 copied to clipboard

unlisted

Official Yalo Flutter chat SDK

Yalo

Chat Flutter SDK #

A Flutter package providing a complete chat UI solution for integrating with Yalo's messaging platform.

Flutter SDK

Features #

  • Cross-platform (iOS, Android, Web)
  • Customizable themes and styling
  • Real-time messaging
  • Photo and video attachments
  • Voice messages
  • Product messages and carousels
  • Localization (English, Spanish)

Installation #

The package is published on pub.dev.

flutter pub add yalo_chat_flutter_sdk

Message types #

The SDK supports various message types:

  • Text messages
  • Image messages
  • Video messages
  • Voice messages
  • Product messages and carousels
  • Button messages
  • CTA (call-to-action) messages

Quick start #

1. Initialize the SDK #

import 'package:yalo_chat_flutter_sdk/yalo_sdk.dart';

void main() {
  WidgetsFlutterBinding.ensureInitialized();
  final YaloChatClient client = YaloChatClient(
    name: 'Chat name',
    channelId: 'your-channel-id',
    organizationId: 'your-organization-id',
    userId: 'optional-user-id', // Optional: identify the user with your own ID
  );
}

2. Add the Chat widget #

class ChatScreen extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Chat(
      client: yaloChatClient,
      theme: ChatTheme(),
    );
  }
}

Configuration #

YaloChatClient options #

Parameter Type Required Description
name String Yes The chat name displayed in the header.
channelId String Yes Your Yalo channel ID.
organizationId String Yes Your Yalo organization ID.
userId String? No Your own user identifier. When provided, the chat session is linked to your user.

Logging #

Yalo Flutter SDK uses the logging package. Enable logging by defining a root logger:

void main() {
  Logger.root.level = Level.ALL;
  Logger.root.onRecord.listen((record) {
    debugPrint(
      '${record.level.name}: ${record.time}: ${record.message} ${record.error ?? ''}',
    );
  });
}

Commands #

Commands let you handle client-to-channel actions locally instead of sending them through the default remote API. See the Commands documentation for the full list of available commands and usage examples.

Theming #

The widget can be fully customized with the ChatTheme class. See the Theming API for the complete list of color, text style, and icon properties.

Examples #

Check out the /example folder for a complete implementation example.

cd example
flutter run

Requirements #

  • Flutter SDK: >=3.0.0
  • Dart: >=3.0.0
  • iOS: >=11.0
  • Android: API level 21+

Support #