Flutter Chat: Highly Customizable Conversation UI
- Offers a modern conversation UI to facilitate communication among users.
- Displays both one-on-one and group conversations.
- Provides a wide range of customization options for message content, headers, footers, avatars, editors, and action buttons.
Trusted by the worldโs leading companies
Overview
The Flutter Chat widget is a powerful and customizable tool designed to simplify the integration of real-time chat functionality. It allows users to customize the message content, header, footer, avatar, text editor, and action buttons.
Placeholder
Define a custom widget to show when there are no messages in the chat. This feature is especially beneficial for providing users with an engaging or pertinent message that signifies the conversation is currently empty.
Composer
This is the primary text editor where users can compose new chat messages.
Default composer
The text editor allows users to customize its entire appearance by adding hint text, borders, prefix icons, suffix icons, and more.
Builder
Specify a custom widget to serve as a composer, allowing one or more widgets to enable multiple options for composing a message.
Action button
This is used for the Send button. Pressing this action button invokes the callback, where the outgoing user rebuilds the chat widget with their composed message.
Default button
The default action button will be enabled when the default text editor begins composing the message. Additionally, there are options available to customize the UI, including its color, shape, and size.
Builder
Define a custom widget consisting of one or more interactive widgets to serve as action buttons, such as a send button, microphone button, or file attachment button.
Conversation
This UI displays the content of incoming and outgoing messages. Each message includes details such as the message text, time stamp, and author. Additionally, the message content can be extended to include more information about the chat message.
Incoming message
The content of incoming messages can be customized. Change the background color, content shape, and other features according to the message user or specific conditions.
Outgoing message
The content of outgoing messages can be customized. Change the background color, content shape, and other features according to the message user or specific conditions.
Header
The header displays the username of the messageโs author along with the time stamp. Additionally, users can build a custom widget to display more information about the chat message.
Footer
Define a custom widget to display additional information about the chat message, such as the time stamp or message delivery status.
Avatar
The authorโs avatar displays either an image or the initials of their name. By default, if the avatar image source is not defined, the userโs initials will be displayed. Additionally, users can create a custom widget that shows more information about them.
Content
Users can customize the message contentโs background color, content shape, and other features based on the user or other specific conditions. By default, the text content is shown as not selectable, but there is an option to display the message content using a custom widget.
Flutter Chat code example
Easily get started with the Flutter Chat widget using just a few lines of Dart code, as demonstrated below. Also explore our Flutter Chat example, which shows you how to render and configure the Chat widget in Flutter.
import 'package:flutter/material.dart'; import 'package:syncfusion_flutter_chat/chat.dart'; class ChatSample extends StatefulWidget { const ChatSample({super.key}); @override State<StatefulWidget> createState() => ChatSampleState(); } class ChatSampleState extends State<ChatSample> { late List<ChatMessage> _messages; @override void initState() { _messages = <ChatMessage>[ ChatMessage( text: 'Hello, how can I help you today?', time: DateTime.now(), author: const ChatAuthor( id: 'a2c4-56h8-9x01-2a3d', name: 'Incoming user name', ), ), ]; super.initState(); } @override Widget build(BuildContext context) { return MaterialApp( home: Scaffold( body: SfChat( messages: _messages, outgoingUser: '8ob3-b720-g9s6-25s8', composer: const ChatComposer( decoration: InputDecoration( hintText: 'Type a message', ), ), actionButton: ChatActionButton( onPressed: (String newMessage) { setState(() { _messages.add(ChatMessage( text: newMessage, time: DateTime.now(), author: const ChatAuthor( id: '8ob3-b720-g9s6-25s8', name: 'Outgoing user name', ), )); }); }, ), ), ), ); } @override void dispose() { _messages.clear(); super.dispose(); } }
All our Flutter UI & DataViz Widgets
Our Customers Love Us
Here are some of their experiences.
See Real Success Stories
Developers around the world trust Syncfusionโs Essential Studio to simplify complex projects and speed up delivery. With a vast library of UI controls, powerful SDKs, and reliable support, Essential Studio helps teams build enterprise-ready applications with confidence.
Read Our Customer StoriesIndustry
Software development
75% Cost reduction
50% Faster development
โIf somebody is looking for a great tool to work with? Yes. I would definitely recommend Syncfusion for anyone who is trying to develop something meaningful.โ
- Somnath Maji (Founder of Igniatek Consultancy)
Read StoryIndustry
Utilities (oil and gas)
Advanced, flexible features
Empowered users through robust and versatile functionality.
โSyncfusionโs tools have taken care of many things so I can focus on developing the application, instead of developing tools for the application.โ
- James Athyal (Software developer, McDaniel & Associates Consultants Ltd)
Read StoryIndustry
Software and technology
Efficient file management
Streamlined workflows with document libraries without building them from scratch.
โWe really love when the magic happens.โ
- Irvin Dominin (BUILDER WEB Development Manager at Sistemi)
Read StoryIndustry
Software and technology
โWe are Syncfusion fans because of the way Syncfusion treats the support.โ
- Dr. Howard Rybko (CEO of Synchrony Digital)
Read StoryIndustry
IT services and IT consulting
Improved performance
Large datasets handled with easy customization and quick debugging.
Highly customizable
Plug-and-play controls with quick template integration.
โI will surely recommend Syncfusion to others as a third-party control because I think itโs very easily customizable.โ
- Jayesh (Technical Team Lead, Capita)
Read StoryIndustry
Professional services
โWe definitely wanted Syncfusion to help us with our document processing functionality, and we were happy with and satisfied with Syncfusion.โ
- Arvind Naik (Engineering Lead, Vialto Partners)
Read StoryRated by users across the globe
Awards
Greatnessโitโs one thing to say you have it, but it means more when others recognize it. Syncfusionยฎ is proud to hold the following industry awards.
