diff --git a/packages/flutter_chat_local/lib/service/local_chat_detail_service.dart b/packages/flutter_chat_local/lib/service/local_chat_detail_service.dart index 7341235..b0cf5d2 100644 --- a/packages/flutter_chat_local/lib/service/local_chat_detail_service.dart +++ b/packages/flutter_chat_local/lib/service/local_chat_detail_service.dart @@ -68,7 +68,7 @@ class LocalChatDetailService with ChangeNotifier implements ChatDetailService { .chats .firstWhere((element) => element.id == chatId); var message = ChatImageMessageModel( - sender: ChatUserModel( + sender: const ChatUserModel( id: '3', firstName: 'ico', lastName: 'nica', @@ -101,7 +101,7 @@ class LocalChatDetailService with ChangeNotifier implements ChatDetailService { .chats .firstWhere((element) => element.id == chatId); var message = ChatTextMessageModel( - sender: ChatUserModel( + sender: const ChatUserModel( id: '3', firstName: 'ico', lastName: 'nica', diff --git a/packages/flutter_chat_local/lib/service/local_chat_user_service.dart b/packages/flutter_chat_local/lib/service/local_chat_user_service.dart index 5a0f5a7..5ad90db 100644 --- a/packages/flutter_chat_local/lib/service/local_chat_user_service.dart +++ b/packages/flutter_chat_local/lib/service/local_chat_user_service.dart @@ -4,19 +4,19 @@ import 'package:flutter_chat_interface/flutter_chat_interface.dart'; class LocalChatUserService implements ChatUserService { /// List of predefined chat users. List users = [ - ChatUserModel( + const ChatUserModel( id: '1', firstName: 'John', lastName: 'Doe', imageUrl: 'https://picsum.photos/200/300', ), - ChatUserModel( + const ChatUserModel( id: '2', firstName: 'Jane', lastName: 'Doe', imageUrl: 'https://picsum.photos/200/300', ), - ChatUserModel( + const ChatUserModel( id: '3', firstName: 'ico', lastName: 'nica', @@ -29,7 +29,8 @@ class LocalChatUserService implements ChatUserService { Future.value(users.where((element) => element.id != '3').toList()); @override - Future getCurrentUser() => Future.value(ChatUserModel()); + Future getCurrentUser() => + Future.value(const ChatUserModel()); @override Future getUser(String id) {