fix: fix linter issue

This commit is contained in:
Vick Top 2024-04-19 15:40:25 +02:00
parent 3de70d7710
commit 70c795e89a
2 changed files with 7 additions and 6 deletions

View file

@ -68,7 +68,7 @@ class LocalChatDetailService with ChangeNotifier implements ChatDetailService {
.chats .chats
.firstWhere((element) => element.id == chatId); .firstWhere((element) => element.id == chatId);
var message = ChatImageMessageModel( var message = ChatImageMessageModel(
sender: ChatUserModel( sender: const ChatUserModel(
id: '3', id: '3',
firstName: 'ico', firstName: 'ico',
lastName: 'nica', lastName: 'nica',
@ -101,7 +101,7 @@ class LocalChatDetailService with ChangeNotifier implements ChatDetailService {
.chats .chats
.firstWhere((element) => element.id == chatId); .firstWhere((element) => element.id == chatId);
var message = ChatTextMessageModel( var message = ChatTextMessageModel(
sender: ChatUserModel( sender: const ChatUserModel(
id: '3', id: '3',
firstName: 'ico', firstName: 'ico',
lastName: 'nica', lastName: 'nica',

View file

@ -4,19 +4,19 @@ import 'package:flutter_chat_interface/flutter_chat_interface.dart';
class LocalChatUserService implements ChatUserService { class LocalChatUserService implements ChatUserService {
/// List of predefined chat users. /// List of predefined chat users.
List<ChatUserModel> users = [ List<ChatUserModel> users = [
ChatUserModel( const ChatUserModel(
id: '1', id: '1',
firstName: 'John', firstName: 'John',
lastName: 'Doe', lastName: 'Doe',
imageUrl: 'https://picsum.photos/200/300', imageUrl: 'https://picsum.photos/200/300',
), ),
ChatUserModel( const ChatUserModel(
id: '2', id: '2',
firstName: 'Jane', firstName: 'Jane',
lastName: 'Doe', lastName: 'Doe',
imageUrl: 'https://picsum.photos/200/300', imageUrl: 'https://picsum.photos/200/300',
), ),
ChatUserModel( const ChatUserModel(
id: '3', id: '3',
firstName: 'ico', firstName: 'ico',
lastName: 'nica', lastName: 'nica',
@ -29,7 +29,8 @@ class LocalChatUserService implements ChatUserService {
Future.value(users.where((element) => element.id != '3').toList()); Future.value(users.where((element) => element.id != '3').toList());
@override @override
Future<ChatUserModel?> getCurrentUser() => Future.value(ChatUserModel()); Future<ChatUserModel?> getCurrentUser() =>
Future.value(const ChatUserModel());
@override @override
Future<ChatUserModel?> getUser(String id) { Future<ChatUserModel?> getUser(String id) {