diff --git a/README.md b/README.md index cd2cc0b..df9a654 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ # Flutter Community Chat Flutter Community Chat is a package which gives the possibility to add a (personal or group) chat to your Flutter-application. Default this package adds support for a Firebase back-end. You can add your custom back-end (like a Websocket-API) by extending the `CommunityChatInterface` interface from the `flutter_community_chat_interface` package. +![Flutter Community Chat GIF](example.gif) + ## Setup To use this package, add flutter_community_chat as a dependency in your pubspec.yaml file: diff --git a/example.gif b/example.gif new file mode 100644 index 0000000..0f4bc70 Binary files /dev/null and b/example.gif differ diff --git a/packages/flutter_community_chat_view/example/lib/main.dart b/packages/flutter_community_chat_view/example/lib/main.dart index 773fd95..18eb8f3 100644 --- a/packages/flutter_community_chat_view/example/lib/main.dart +++ b/packages/flutter_community_chat_view/example/lib/main.dart @@ -43,7 +43,7 @@ class _MyStatefulWidgetState extends State { imageUrl: 'https://xsgames.co/randomusers/avatar.php?g=male', ), text: 'Met mij gaat het goed, dankje!', - timestamp: DateTime.now(), + timestamp: DateTime.now().subtract(const Duration(days: 2)), ) ]; @@ -53,21 +53,23 @@ class _MyStatefulWidgetState extends State { lastName: 'Sjagerars', imageUrl: 'https://xsgames.co/randomusers/avatar.php?g=female', ), + lastUsed: DateTime.now(), messages: messages, ); static final groupChat = GroupChatModel( - title: 'Group chat', - imageUrl: 'https://xsgames.co/randomusers/avatar.php?g=male', - users: [pietUser, janUser], - messages: messages); + title: 'Group chat', + imageUrl: 'https://xsgames.co/randomusers/avatar.php?g=male', + users: [pietUser, janUser], + lastUsed: DateTime.now().subtract(const Duration(days: 1)), + messages: messages, + ); Stream> get chatStream => (() { late StreamController> controller; controller = StreamController>( onListen: () { controller.add([ - chat, groupChat, chat, ]); diff --git a/packages/flutter_community_chat_view/example/pubspec.lock b/packages/flutter_community_chat_view/example/pubspec.lock index a417737..1708913 100644 --- a/packages/flutter_community_chat_view/example/pubspec.lock +++ b/packages/flutter_community_chat_view/example/pubspec.lock @@ -218,8 +218,8 @@ packages: dependency: transitive description: path: "packages/flutter_community_chat_interface" - ref: "feature/group-chats" - resolved-ref: cc5c5b6e1cd12c150a0aa7e1b363cc45267009c3 + ref: "0.3.0" + resolved-ref: "3003ed53896c045574ecc64e00c113db3b850e7f" url: "https://github.com/Iconica-Development/flutter_community_chat.git" source: git version: "0.3.0"