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());
}
36
likes
140
pub points
97%
popularity

Publisher

verified publisherflyer.chat

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