chatify_text_message 0.0.3
chatify_text_message: ^0.0.3 copied to clipboard
Chatify's text message implementation.
Chatify Text Message #
Text message provider for Chatify. Implements a TextMessage content model and a TextMessageProvider that renders messages and supports composing from text input.
Installation #
flutter pub add chatify_text_message
Usage #
Register the provider when initializing Chatify:
import 'package:chatify/chatify.dart';
import 'package:chatify_text_message/chatify_text_message.dart';
await Chatify.init(
currentUser: currentUser,
chatRepo: chatRepo,
messageRepoFactory: (chat) => messageRepoFor(chat),
uploaderFactory: (attachment) => uploaderFor(attachment),
messageProviders: [
TextMessageProvider(),
],
);
API #
TextMessageextendsMessageContentand serializes to/from JSONTextMessageProviderextendsBasicMessageProvider<TextMessage>and:- supports text input (
supportsTextInput = true) - builds
TextMessageWidgetfor display
- supports text input (