Skip to content

Commit

Permalink
🐛 Fix issue of unmodifiable list.
Browse files Browse the repository at this point in the history
  • Loading branch information
dhvanit-v-simformsolutions authored and DhvanitVaghani committed Mar 27, 2023
1 parent 9e370f6 commit dc4a2f0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ class ChatScreen extends StatefulWidget {
class _ChatScreenState extends State<ChatScreen> {
AppTheme theme = LightTheme();
bool isDarkTheme = false;
final currentUser = const ChatUser(
final currentUser = ChatUser(
id: '1',
name: 'Flutter',
profilePhoto: Data.profileImage,
);
final _chatController = ChatController(
initialMessageList: Data.messageList,
scrollController: ScrollController(),
chatUsers: const [
chatUsers: [
ChatUser(
id: '2',
name: 'Simform',
Expand Down
2 changes: 1 addition & 1 deletion lib/src/models/chat_user.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class ChatUser {
/// Provides profile picture URL of user.
final String? profilePhoto;

const ChatUser({
ChatUser({
required this.id,
required this.name,
this.profilePhoto,
Expand Down

0 comments on commit dc4a2f0

Please sign in to comment.