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

Chatify's file message implementation.

Chatify File Message #

File message provider for Chatify. Defines FileMessage content and a FileMessageProvider that renders files and provides a composer action to pick and upload arbitrary files.

Installation #

flutter pub add chatify_file_message

Usage #

Register the provider when initializing Chatify:

import 'package:chatify/chatify.dart';
import 'package:chatify_file_message/chatify_file_message.dart';

await Chatify.init(
  currentUser: currentUser,
  chatRepo: chatRepo,
  messageRepoFactory: (chat) => messageRepoFor(chat),
  uploaderFactory: (attachment) => uploaderFor(attachment),
  messageProviders: [
    FileMessageProvider(),
  ],
);

The provider adds a composer action labelled “File” that returns MediaComposerResult with file metadata and bytes. Chatify uploads using your AttachmentUploader, then calls MessageRepo.add(...) with the final URL.

API #

  • FileMessage extends MessageContent with: name, extension, size
  • FileMessageProvider extends MediaMessageProvider<FileMessage> and exposes a composer action
  • FileMessageWidget displays a file bubble; tapping downloads/opens the file where supported
0
likes
120
points
247
downloads

Publisher

unverified uploader

Weekly Downloads

Chatify's file message implementation.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

chatify, file_picker, flutter, iconsax, open_filex, path_provider, universal_html

More

Packages that depend on chatify_file_message