flutter_chat_types 3.6.2 copy "flutter_chat_types: ^3.6.2" to clipboard
flutter_chat_types: ^3.6.2 copied to clipboard

Utility library for the flutter_chat_ui and flutter_firebase_chat_core libraries which contains shared type declarations.

example/main.dart

import 'package:flutter_chat_types/flutter_chat_types.dart'
    show TextMessage, User;

void main() {
  const user = User(id: 'authorId');
  const message = TextMessage(author: user, id: 'id', text: 'text');
  // ignore: avoid_print
  print(message.toJson());
  final json = {
    'author': {'id': 'authorId'},
    'id': 'id',
    'text': 'text',
  };
  // ignore: avoid_print
  print(TextMessage.fromJson(json).toJson());
}
44
likes
160
points
60.7k
downloads

Publisher

verified publisherflyer.chat

Weekly Downloads

Utility library for the flutter_chat_ui and flutter_firebase_chat_core libraries which contains shared type declarations.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

equatable, json_annotation, meta

More

Packages that depend on flutter_chat_types