diff --git a/packages/stream_chat/lib/src/client/client.dart b/packages/stream_chat/lib/src/client/client.dart index a43f7f57..c84ae144 100644 --- a/packages/stream_chat/lib/src/client/client.dart +++ b/packages/stream_chat/lib/src/client/client.dart @@ -1441,6 +1441,8 @@ class ClientState { /// The current user as a stream Stream get currentUserStream => _currentUserController.stream; + // coverage:ignore-start + /// The current user @Deprecated('Use `.currentUser` instead, Will be removed in future releases') OwnUser? get user => _currentUserController.valueOrNull; @@ -1451,6 +1453,8 @@ class ClientState { ) Stream get userStream => _currentUserController.stream; + // coverage:ignore-end + /// The current user Map get users => _usersController.value; diff --git a/packages/stream_chat_flutter/lib/src/stream_chat.dart b/packages/stream_chat_flutter/lib/src/stream_chat.dart index 35946634..278b82d3 100644 --- a/packages/stream_chat_flutter/lib/src/stream_chat.dart +++ b/packages/stream_chat_flutter/lib/src/stream_chat.dart @@ -126,6 +126,8 @@ class StreamChatState extends State { return defaultTheme.merge(themeData); } + // coverage:ignore-start + /// The current user @Deprecated('Use `.currentUser` instead, Will be removed in future releases') User? get user => widget.client.state.currentUser; @@ -136,6 +138,8 @@ class StreamChatState extends State { ) Stream get userStream => widget.client.state.currentUserStream; + // coverage:ignore-end + /// The current user User? get currentUser => widget.client.state.currentUser; diff --git a/packages/stream_chat_flutter_core/lib/src/stream_chat_core.dart b/packages/stream_chat_flutter_core/lib/src/stream_chat_core.dart index 0f1bd4d8..3d07b3c7 100644 --- a/packages/stream_chat_flutter_core/lib/src/stream_chat_core.dart +++ b/packages/stream_chat_flutter_core/lib/src/stream_chat_core.dart @@ -97,6 +97,8 @@ class StreamChatCoreState extends State @override Widget build(BuildContext context) => widget.child; + // coverage:ignore-start + /// The current user @Deprecated('Use `.currentUser` instead, Will be removed in future releases') User? get user => client.state.currentUser; @@ -107,6 +109,8 @@ class StreamChatCoreState extends State ) Stream get userStream => client.state.currentUserStream; + // coverage:ignore-end + /// The current user User? get currentUser => client.state.currentUser;