mirror of
https://github.com/Iconica-Development/flutter_chat.git
synced 2025-05-18 18:33:49 +02:00
commit
80b25113e1
8 changed files with 46 additions and 31 deletions
|
@ -1,3 +1,7 @@
|
|||
## 0.3.1 - July 11 2023
|
||||
|
||||
- Removed image message when there is no last message in a chat
|
||||
|
||||
## 0.3.0 - March 31 2023
|
||||
|
||||
- Added support for group chats
|
||||
|
|
7
FEATURES.md
Normal file
7
FEATURES.md
Normal file
|
@ -0,0 +1,7 @@
|
|||
List of Features from this component:
|
||||
* A chat overview screen
|
||||
* A chat detail screen
|
||||
* Chats can be between 2 users or group chats
|
||||
* Chats can contain messages or images
|
||||
* Interface for interacting with the messages(createChat, sendMessage, etc.)
|
||||
* Firebase implementation of the interface
|
|
@ -1,6 +1,6 @@
|
|||
name: flutter_community_chat
|
||||
description: A new Flutter package project.
|
||||
version: 0.3.0
|
||||
version: 0.3.1
|
||||
|
||||
publish_to: none
|
||||
|
||||
|
@ -15,12 +15,12 @@ dependencies:
|
|||
git:
|
||||
url: https://github.com/Iconica-Development/flutter_community_chat.git
|
||||
path: packages/flutter_community_chat_view
|
||||
ref: 0.3.0
|
||||
ref: 0.3.1
|
||||
flutter_community_chat_interface:
|
||||
git:
|
||||
url: https://github.com/Iconica-Development/flutter_community_chat.git
|
||||
path: packages/flutter_community_chat_interface
|
||||
ref: 0.3.0
|
||||
ref: 0.3.1
|
||||
|
||||
dev_dependencies:
|
||||
flutter_lints: ^2.0.0
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
name: flutter_community_chat_firebase
|
||||
description: A new Flutter package project.
|
||||
version: 0.3.0
|
||||
version: 0.3.1
|
||||
publish_to: none
|
||||
|
||||
environment:
|
||||
|
@ -19,7 +19,7 @@ dependencies:
|
|||
git:
|
||||
url: https://github.com/Iconica-Development/flutter_community_chat.git
|
||||
path: packages/flutter_community_chat_interface
|
||||
ref: 0.3.0
|
||||
ref: 0.3.1
|
||||
|
||||
dev_dependencies:
|
||||
flutter_lints: ^2.0.0
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
name: flutter_community_chat_interface
|
||||
description: A new Flutter package project.
|
||||
version: 0.3.0
|
||||
version: 0.3.1
|
||||
publish_to: none
|
||||
|
||||
environment:
|
||||
|
|
|
@ -53,4 +53,6 @@ web
|
|||
windows
|
||||
macos
|
||||
linux
|
||||
.metadata
|
||||
.metadata
|
||||
|
||||
pubspec.lock
|
||||
|
|
|
@ -33,9 +33,10 @@ class _ChatScreenState extends State<ChatScreen> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
var translations = widget.translations;
|
||||
return widget.options.scaffoldBuilder(
|
||||
AppBar(
|
||||
title: Text(widget.translations.chatsTitle),
|
||||
title: Text(translations.chatsTitle),
|
||||
),
|
||||
Column(
|
||||
children: [
|
||||
|
@ -54,16 +55,15 @@ class _ChatScreenState extends State<ChatScreen> {
|
|||
context: context,
|
||||
builder: (BuildContext context) => AlertDialog(
|
||||
title: Text(
|
||||
widget.translations.deleteChatModalTitle,
|
||||
translations.deleteChatModalTitle,
|
||||
),
|
||||
content: Text(
|
||||
widget
|
||||
.translations.deleteChatModalDescription,
|
||||
translations.deleteChatModalDescription,
|
||||
),
|
||||
actions: [
|
||||
TextButton(
|
||||
child: Text(
|
||||
widget.translations.deleteChatModalCancel,
|
||||
translations.deleteChatModalCancel,
|
||||
),
|
||||
onPressed: () =>
|
||||
Navigator.of(context).pop(false),
|
||||
|
@ -72,8 +72,7 @@ class _ChatScreenState extends State<ChatScreen> {
|
|||
onPressed: () =>
|
||||
Navigator.of(context).pop(true),
|
||||
child: Text(
|
||||
widget
|
||||
.translations.deleteChatModalConfirm,
|
||||
translations.deleteChatModalConfirm,
|
||||
),
|
||||
),
|
||||
],
|
||||
|
@ -87,7 +86,7 @@ class _ChatScreenState extends State<ChatScreen> {
|
|||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Text(
|
||||
widget.translations.deleteChatButton,
|
||||
translations.deleteChatButton,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -106,13 +105,15 @@ class _ChatScreenState extends State<ChatScreen> {
|
|||
40.0,
|
||||
),
|
||||
title: chat.user.fullName,
|
||||
subTitle: chat.lastMessage != null &&
|
||||
chat.lastMessage
|
||||
subTitle: chat.lastMessage != null
|
||||
? chat.lastMessage
|
||||
is ChatTextMessageModel
|
||||
? (chat.lastMessage!
|
||||
as ChatTextMessageModel)
|
||||
.text
|
||||
: '📷 ${widget.translations.image}',
|
||||
? (chat.lastMessage!
|
||||
as ChatTextMessageModel)
|
||||
.text
|
||||
: '📷 '
|
||||
'${translations.image}'
|
||||
: '',
|
||||
lastUsed: chat.lastUsed != null
|
||||
? _dateFormatter.format(
|
||||
date: chat.lastUsed!,
|
||||
|
@ -121,14 +122,15 @@ class _ChatScreenState extends State<ChatScreen> {
|
|||
)
|
||||
: ChatRow(
|
||||
title: (chat as GroupChatModel).title,
|
||||
subTitle: chat.lastMessage != null &&
|
||||
chat.lastMessage
|
||||
subTitle: chat.lastMessage != null
|
||||
? chat.lastMessage
|
||||
is ChatTextMessageModel
|
||||
? (chat.lastMessage!
|
||||
as ChatTextMessageModel)
|
||||
.text
|
||||
: '📷 '
|
||||
'${widget.translations.image}',
|
||||
? (chat.lastMessage!
|
||||
as ChatTextMessageModel)
|
||||
.text
|
||||
: '📷 '
|
||||
'${translations.image}'
|
||||
: '',
|
||||
avatar:
|
||||
widget.options.groupAvatarBuilder(
|
||||
chat.imageUrl,
|
||||
|
@ -155,7 +157,7 @@ class _ChatScreenState extends State<ChatScreen> {
|
|||
widget.options.newChatButtonBuilder(
|
||||
context,
|
||||
widget.onPressStartChat!,
|
||||
widget.translations,
|
||||
translations,
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
name: flutter_community_chat_view
|
||||
description: A standard flutter package.
|
||||
version: 0.3.0
|
||||
version: 0.3.1
|
||||
|
||||
publish_to: none
|
||||
|
||||
|
@ -20,7 +20,7 @@ dependencies:
|
|||
git:
|
||||
url: https://github.com/Iconica-Development/flutter_community_chat.git
|
||||
path: packages/flutter_community_chat_interface
|
||||
ref: 0.3.0
|
||||
ref: 0.3.1
|
||||
cached_network_image: ^3.2.2
|
||||
flutter_image_picker:
|
||||
git:
|
||||
|
|
Loading…
Reference in a new issue