Skip to content

Commit 69f748a

Browse files
committed
chore: fix lint
1 parent 6e74ec6 commit 69f748a

File tree

6 files changed

+12
-10
lines changed

6 files changed

+12
-10
lines changed

packages/stream_chat/lib/src/core/models/push_preference.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ class PushPreferenceInput {
8181
/// The class that contains push preferences for a user
8282
@JsonSerializable(includeIfNull: false)
8383
class PushPreference extends Equatable {
84+
/// Creates a new push preference instance
8485
const PushPreference({
8586
this.callLevel,
8687
this.chatLevel,
@@ -110,6 +111,7 @@ class PushPreference extends Equatable {
110111
/// The class that contains push preferences for a specific channel
111112
@JsonSerializable(includeIfNull: false)
112113
class ChannelPushPreference extends Equatable {
114+
/// Creates a new channel push preference instance
113115
const ChannelPushPreference({
114116
this.chatLevel,
115117
this.disabledUntil,

packages/stream_chat/test/src/core/models/push_preference_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ void main() {
3535
});
3636

3737
test('should include default enum value', () {
38-
final input = PushPreferenceInput(
38+
const input = PushPreferenceInput(
3939
chatLevel: ChatLevelPushPreference.defaultValue,
4040
callLevel: CallLevelPushPreference.defaultValue,
4141
);

packages/stream_chat/test/src/db/chat_persistence_client_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ void main() {
251251
});
252252

253253
test('updateChannelState', () async {
254-
final channelState = ChannelState();
254+
const channelState = ChannelState();
255255
persistenceClient.updateChannelState(channelState);
256256
});
257257

packages/stream_chat_flutter/test/src/mocks.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class MockChannel extends Mock implements Channel {
5353
PaginationParams? membersPagination,
5454
PaginationParams? watchersPagination,
5555
}) {
56-
return Future.value(ChannelState());
56+
return Future.value(const ChannelState());
5757
}
5858

5959
@override

packages/stream_chat_flutter_core/test/message_list_core_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ void main() {
310310
messagesPagination: any(named: 'messagesPagination'),
311311
preferOffline: any(named: 'preferOffline'),
312312
watchersPagination: any(named: 'watchersPagination'),
313-
)).thenAnswer((_) async => ChannelState());
313+
)).thenAnswer((_) async => const ChannelState());
314314

315315
const messages = <Message>[];
316316
when(() => mockChannel.state.messagesStream)

packages/stream_chat_flutter_core/test/stream_channel_test.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ void main() {
184184
final nonInitializedMockChannel = NonInitializedMockChannel();
185185
when(() => nonInitializedMockChannel.cid).thenReturn('test:channel');
186186
when(nonInitializedMockChannel.watch).thenAnswer(
187-
(_) async => ChannelState(),
187+
(_) async => const ChannelState(),
188188
);
189189

190190
// A simple widget that provides StreamChannel
@@ -221,7 +221,7 @@ void main() {
221221
final nonInitializedMockChannel = NonInitializedMockChannel();
222222
when(() => nonInitializedMockChannel.cid).thenReturn('test:channel');
223223
when(nonInitializedMockChannel.watch).thenAnswer(
224-
(_) async => ChannelState(),
224+
(_) async => const ChannelState(),
225225
);
226226

227227
// A simple widget that provides StreamChannel
@@ -362,7 +362,7 @@ void main() {
362362
messagesPagination: any(named: 'messagesPagination'),
363363
preferOffline: any(named: 'preferOffline'),
364364
),
365-
).thenAnswer((_) async => ChannelState());
365+
).thenAnswer((_) async => const ChannelState());
366366

367367
// Build a widget with initialMessageId
368368
final testWidget = MaterialApp(
@@ -411,7 +411,7 @@ void main() {
411411
// Second channel
412412
final mockChannel2 = NonInitializedMockChannel();
413413
when(() => mockChannel2.cid).thenReturn('test:channel2');
414-
when(mockChannel2.watch).thenAnswer((_) async => ChannelState());
414+
when(mockChannel2.watch).thenAnswer((_) async => const ChannelState());
415415

416416
// Update widget with second channel
417417
await tester.pumpWidget(
@@ -448,7 +448,7 @@ void main() {
448448
messagesPagination: any(named: 'messagesPagination'),
449449
preferOffline: any(named: 'preferOffline'),
450450
),
451-
).thenAnswer((_) async => ChannelState());
451+
).thenAnswer((_) async => const ChannelState());
452452

453453
// First initial message ID
454454
const initialMessageId1 = 'test-message-id-1';
@@ -510,7 +510,7 @@ void main() {
510510
preferOffline: any(named: 'preferOffline'),
511511
messagesPagination: any(named: 'messagesPagination'),
512512
),
513-
).thenAnswer((_) async => ChannelState());
513+
).thenAnswer((_) async => const ChannelState());
514514
});
515515

516516
tearDown(() => reset(mockChannel));

0 commit comments

Comments
 (0)