rename Client to StreamChatClient

This commit is contained in:
Salvatore Giordano
2021-02-01 15:30:46 +01:00
parent 1751cd6092
commit 23feabe85e
33 changed files with 185 additions and 176 deletions
+6 -6
View File
@@ -2,9 +2,9 @@ import 'package:flutter/material.dart';
import 'package:stream_chat/stream_chat.dart';
Future<void> main() async {
/// Create a new instance of [Client] passing the apikey obtained from your
/// Create a new instance of [StreamChatClient] passing the apikey obtained from your
/// project dashboard.
final client = Client('b67pax5b2wdq');
final client = StreamChatClient('b67pax5b2wdq');
/// Set the current user. In a production scenario, this should be done using
/// a backend to generate a user token using our server SDK.
@@ -48,9 +48,9 @@ class StreamExample extends StatelessWidget {
@required this.channel,
}) : super(key: key);
/// Instance of [Client] we created earlier. This contains information about
/// Instance of [StreamChatClient] we created earlier. This contains information about
/// our application and connection state.
final Client client;
final StreamChatClient client;
/// The channel we'd like to observe and participate.
final Channel channel;
@@ -242,7 +242,7 @@ class _MessageViewState extends State<MessageView> {
}
}
/// Helper extension for quickly retrieving the current user id from a [Client].
extension on Client {
/// Helper extension for quickly retrieving the current user id from a [StreamChatClient].
extension on StreamChatClient {
String get uid => state.user.id;
}