Merge pull request #7 from Iconica-Development/0.3.1

0.3.1
This commit is contained in:
Gorter-dev 2023-07-11 14:08:11 +02:00 committed by GitHub
commit 80b25113e1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 46 additions and 31 deletions

View file

@ -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 ## 0.3.0 - March 31 2023
- Added support for group chats - Added support for group chats

7
FEATURES.md Normal file
View 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

View file

@ -1,6 +1,6 @@
name: flutter_community_chat name: flutter_community_chat
description: A new Flutter package project. description: A new Flutter package project.
version: 0.3.0 version: 0.3.1
publish_to: none publish_to: none
@ -15,12 +15,12 @@ dependencies:
git: git:
url: https://github.com/Iconica-Development/flutter_community_chat.git url: https://github.com/Iconica-Development/flutter_community_chat.git
path: packages/flutter_community_chat_view path: packages/flutter_community_chat_view
ref: 0.3.0 ref: 0.3.1
flutter_community_chat_interface: flutter_community_chat_interface:
git: git:
url: https://github.com/Iconica-Development/flutter_community_chat.git url: https://github.com/Iconica-Development/flutter_community_chat.git
path: packages/flutter_community_chat_interface path: packages/flutter_community_chat_interface
ref: 0.3.0 ref: 0.3.1
dev_dependencies: dev_dependencies:
flutter_lints: ^2.0.0 flutter_lints: ^2.0.0

View file

@ -1,6 +1,6 @@
name: flutter_community_chat_firebase name: flutter_community_chat_firebase
description: A new Flutter package project. description: A new Flutter package project.
version: 0.3.0 version: 0.3.1
publish_to: none publish_to: none
environment: environment:
@ -19,7 +19,7 @@ dependencies:
git: git:
url: https://github.com/Iconica-Development/flutter_community_chat.git url: https://github.com/Iconica-Development/flutter_community_chat.git
path: packages/flutter_community_chat_interface path: packages/flutter_community_chat_interface
ref: 0.3.0 ref: 0.3.1
dev_dependencies: dev_dependencies:
flutter_lints: ^2.0.0 flutter_lints: ^2.0.0

View file

@ -1,6 +1,6 @@
name: flutter_community_chat_interface name: flutter_community_chat_interface
description: A new Flutter package project. description: A new Flutter package project.
version: 0.3.0 version: 0.3.1
publish_to: none publish_to: none
environment: environment:

View file

@ -53,4 +53,6 @@ web
windows windows
macos macos
linux linux
.metadata .metadata
pubspec.lock

View file

@ -33,9 +33,10 @@ class _ChatScreenState extends State<ChatScreen> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
var translations = widget.translations;
return widget.options.scaffoldBuilder( return widget.options.scaffoldBuilder(
AppBar( AppBar(
title: Text(widget.translations.chatsTitle), title: Text(translations.chatsTitle),
), ),
Column( Column(
children: [ children: [
@ -54,16 +55,15 @@ class _ChatScreenState extends State<ChatScreen> {
context: context, context: context,
builder: (BuildContext context) => AlertDialog( builder: (BuildContext context) => AlertDialog(
title: Text( title: Text(
widget.translations.deleteChatModalTitle, translations.deleteChatModalTitle,
), ),
content: Text( content: Text(
widget translations.deleteChatModalDescription,
.translations.deleteChatModalDescription,
), ),
actions: [ actions: [
TextButton( TextButton(
child: Text( child: Text(
widget.translations.deleteChatModalCancel, translations.deleteChatModalCancel,
), ),
onPressed: () => onPressed: () =>
Navigator.of(context).pop(false), Navigator.of(context).pop(false),
@ -72,8 +72,7 @@ class _ChatScreenState extends State<ChatScreen> {
onPressed: () => onPressed: () =>
Navigator.of(context).pop(true), Navigator.of(context).pop(true),
child: Text( child: Text(
widget translations.deleteChatModalConfirm,
.translations.deleteChatModalConfirm,
), ),
), ),
], ],
@ -87,7 +86,7 @@ class _ChatScreenState extends State<ChatScreen> {
child: Padding( child: Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Text( child: Text(
widget.translations.deleteChatButton, translations.deleteChatButton,
), ),
), ),
), ),
@ -106,13 +105,15 @@ class _ChatScreenState extends State<ChatScreen> {
40.0, 40.0,
), ),
title: chat.user.fullName, title: chat.user.fullName,
subTitle: chat.lastMessage != null && subTitle: chat.lastMessage != null
chat.lastMessage ? chat.lastMessage
is ChatTextMessageModel is ChatTextMessageModel
? (chat.lastMessage! ? (chat.lastMessage!
as ChatTextMessageModel) as ChatTextMessageModel)
.text .text
: '📷 ${widget.translations.image}', : '📷 '
'${translations.image}'
: '',
lastUsed: chat.lastUsed != null lastUsed: chat.lastUsed != null
? _dateFormatter.format( ? _dateFormatter.format(
date: chat.lastUsed!, date: chat.lastUsed!,
@ -121,14 +122,15 @@ class _ChatScreenState extends State<ChatScreen> {
) )
: ChatRow( : ChatRow(
title: (chat as GroupChatModel).title, title: (chat as GroupChatModel).title,
subTitle: chat.lastMessage != null && subTitle: chat.lastMessage != null
chat.lastMessage ? chat.lastMessage
is ChatTextMessageModel is ChatTextMessageModel
? (chat.lastMessage! ? (chat.lastMessage!
as ChatTextMessageModel) as ChatTextMessageModel)
.text .text
: '📷 ' : '📷 '
'${widget.translations.image}', '${translations.image}'
: '',
avatar: avatar:
widget.options.groupAvatarBuilder( widget.options.groupAvatarBuilder(
chat.imageUrl, chat.imageUrl,
@ -155,7 +157,7 @@ class _ChatScreenState extends State<ChatScreen> {
widget.options.newChatButtonBuilder( widget.options.newChatButtonBuilder(
context, context,
widget.onPressStartChat!, widget.onPressStartChat!,
widget.translations, translations,
), ),
], ],
), ),

View file

@ -4,7 +4,7 @@
name: flutter_community_chat_view name: flutter_community_chat_view
description: A standard flutter package. description: A standard flutter package.
version: 0.3.0 version: 0.3.1
publish_to: none publish_to: none
@ -20,7 +20,7 @@ dependencies:
git: git:
url: https://github.com/Iconica-Development/flutter_community_chat.git url: https://github.com/Iconica-Development/flutter_community_chat.git
path: packages/flutter_community_chat_interface path: packages/flutter_community_chat_interface
ref: 0.3.0 ref: 0.3.1
cached_network_image: ^3.2.2 cached_network_image: ^3.2.2
flutter_image_picker: flutter_image_picker:
git: git: