Skip to content
pubscout

dash_chat_2

0.0.21, released 2 years ago by molteo.com

Complete chat UI widget for Flutter with customizable components and messaging features.

$ flutter pub add dash_chat_2
Source repository

What it does

Provides a comprehensive chat user interface for Flutter applications, handling message lists, text inputs, avatars, quick replies, and markdown text parsing out of the box. It allows developers to easily plug in backend messaging services via callback parameters like `onSend`.

AI-written summary of version 0.0.21, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to build a messaging or chat screen quickly without building message bubbles and input toolbars from scratch.
  • Your app requires features like markdown support, link parsing, user mentions, and quick replies.

Skip it when

  • You only need to display a single static chat bubble rather than a full interactive chat interface.
  • You require a fully built-in backend database client; this package focuses strictly on the UI layer.

Strengths

  • Highly customizable components and options for messages, inputs, and lists.
  • Built-in support for markdown, touchable links, media previews, and user mentions.

Weaknesses

  • Some advanced features like message statuses and replies are marked as work-in-progress (WIP).
  • Audio support is marked as work-in-progress.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
6

not documented

class Basic extends StatefulWidget {
  @override
  _BasicState createState() => _BasicState();
}

class _BasicState extends State<Basic> {
  ChatUser user = ChatUser(
    id: '1',
    firstName: 'Charles',
    lastName: 'Leclerc',
  );

  List<ChatMessage> messages = <ChatMessage>[
    ChatMessage(
      text: 'Hey!',
      user: user,
      createdAt: DateTime.now(),
    ),
  ];

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Basic example'),
      ),
      body: DashChat(
        currentUser: user,
        onSend: (ChatMessage m) {
          setState(() {
            messages.insert(0, m);
          });
        },
        messages: messages,
      ),
    );
  }
}

Alternatives

Packages that do the same job and could replace dash_chat_2.

Works with

Packages commonly used together with dash_chat_2: ones it builds on, ones built on it, and its own family.