feat(stream_chat): upgrade to null safe dependencies
This commit is contained in:
@@ -10,7 +10,7 @@ import 'package:stream_chat/stream_chat.dart';
|
||||
|
||||
void main() {
|
||||
group('src/models/channel_state', () {
|
||||
const jsonExample = r'''{
|
||||
const jsonExample = '''{
|
||||
"channel": {
|
||||
"id": "dev",
|
||||
"type": "team",
|
||||
@@ -853,28 +853,32 @@ void main() {
|
||||
expect(channelState.channel.config.commands, hasLength(1));
|
||||
expect(channelState.channel.config.commands[0], isA<Command>());
|
||||
expect(channelState.channel.lastMessageAt,
|
||||
DateTime.parse("2020-01-30T13:43:41.062362Z"));
|
||||
DateTime.parse('2020-01-30T13:43:41.062362Z'));
|
||||
expect(channelState.channel.createdAt,
|
||||
DateTime.parse("2019-04-03T18:43:33.213373Z"));
|
||||
DateTime.parse('2019-04-03T18:43:33.213373Z'));
|
||||
expect(channelState.channel.updatedAt,
|
||||
DateTime.parse("2019-04-03T18:43:33.213374Z"));
|
||||
DateTime.parse('2019-04-03T18:43:33.213374Z'));
|
||||
expect(channelState.channel.createdBy, isA<User>());
|
||||
expect(channelState.channel.frozen, true);
|
||||
expect(channelState.channel.extraData['example'], 1);
|
||||
expect(channelState.channel.extraData['name'], "#dev");
|
||||
expect(channelState.channel.extraData['image'],
|
||||
"https://cdn.chrisshort.net/testing-certificate-chains-in-go/GOPHER_MIC_DROP.png");
|
||||
expect(channelState.channel.extraData['name'], '#dev');
|
||||
expect(
|
||||
channelState.channel.extraData['image'],
|
||||
'https://cdn.chrisshort.net/testing-certificate-chains-in-go/GOPHER_MIC_DROP.png',
|
||||
);
|
||||
expect(channelState.messages, hasLength(25));
|
||||
expect(channelState.messages[0], isA<Message>());
|
||||
expect(channelState.messages[0], isNotNull);
|
||||
expect(channelState.messages[0].createdAt,
|
||||
DateTime.parse("2020-01-29T03:23:02.843948Z"));
|
||||
expect(
|
||||
channelState.messages[0].createdAt,
|
||||
DateTime.parse('2,020-01-29T03:23:02.843948Z'),
|
||||
);
|
||||
expect(channelState.messages[0].user, isA<User>());
|
||||
expect(channelState.watcherCount, 5);
|
||||
});
|
||||
|
||||
test('should serialize to json correctly', () {
|
||||
const toJsonExample = r'''
|
||||
const toJsonExample = '''
|
||||
{
|
||||
"channel": {
|
||||
"id": "dev",
|
||||
|
||||
Reference in New Issue
Block a user