Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ui, core, localization): Add Poll attachment interactor #2052

Merged
merged 61 commits into from
Dec 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
10968f1
feat: add support for polls api
xsahil03x Oct 25, 2024
678806a
chore: fix analysis
xsahil03x Oct 25, 2024
9468141
Merge branch 'master' into feat/message-polls-apis
deven98 Oct 25, 2024
08029a2
test: fix test
xsahil03x Oct 25, 2024
a9261b9
Merge remote-tracking branch 'origin/feat/message-polls-apis' into fe…
xsahil03x Oct 25, 2024
cd26fbc
revert: revert state changes
xsahil03x Oct 25, 2024
921086d
test: fix test
xsahil03x Oct 25, 2024
33c5a75
chore: fix lints
xsahil03x Oct 25, 2024
b5d3fe5
chore: improve cast poll vote api
xsahil03x Oct 28, 2024
2d429da
feat: add poll event handlers
xsahil03x Oct 29, 2024
4d68b56
Add Poll attachment composer
xsahil03x Nov 11, 2024
06e6be1
add poll creator theme appBarElevation
xsahil03x Nov 12, 2024
d00b542
Add poll creator widget tests
xsahil03x Nov 12, 2024
818f10b
add StreamPollController test
xsahil03x Nov 12, 2024
a5fd7f6
add translations for poll creator
xsahil03x Nov 12, 2024
ceee773
add pollVotingMode, additional poll extensions
xsahil03x Nov 19, 2024
e13d0e1
fix llc tests
xsahil03x Nov 19, 2024
562bc46
add StreamPollVoteListController
xsahil03x Nov 19, 2024
ff8f0d6
move poll creator into a separate directory
xsahil03x Nov 19, 2024
ef256c8
add StreamPollVoteListView
xsahil03x Nov 19, 2024
8466d3c
add poll message preview text
xsahil03x Nov 19, 2024
086a418
add poll related methods to channel
xsahil03x Nov 19, 2024
de36e29
add StreamPollInteractor widget and PollMessage
xsahil03x Nov 21, 2024
758afaa
fix lints
xsahil03x Nov 21, 2024
0b50637
revert maxVisibleOptionCount
xsahil03x Nov 21, 2024
4c506a2
add ui tests and minor changes
xsahil03x Nov 22, 2024
f373927
add refresh indicator to vote list
xsahil03x Nov 22, 2024
e82dda1
fix StreamPollVoteListView additional state texts
xsahil03x Nov 22, 2024
5cd11a3
fix poll comments visibility
xsahil03x Nov 22, 2024
bce5c21
Disallow editing, adding polls in threads
xsahil03x Nov 22, 2024
1315ae1
add locks to poll and vote methods
xsahil03x Nov 25, 2024
8e2a19d
add more tests
xsahil03x Nov 25, 2024
b59f8fb
feat(localization): add new poll interactor strings
xsahil03x Dec 9, 2024
8329d53
feat: add support for polls api
xsahil03x Oct 25, 2024
4653c7a
chore: fix analysis
xsahil03x Oct 25, 2024
b5893cf
test: fix test
xsahil03x Oct 25, 2024
c3cc1d7
revert: revert state changes
xsahil03x Oct 25, 2024
a6fd19b
test: fix test
xsahil03x Oct 25, 2024
9a8626f
chore: fix lints
xsahil03x Oct 25, 2024
8fd289a
chore: improve cast poll vote api
xsahil03x Oct 28, 2024
f9e7664
feat: add poll event handlers
xsahil03x Oct 29, 2024
822ca86
Merge remote-tracking branch 'origin/feat/message-polls-apis' into fe…
xsahil03x Dec 9, 2024
611560e
Merge remote-tracking branch 'origin/feat/polls-attachment-composer' …
xsahil03x Dec 9, 2024
91b1ff8
Merge remote-tracking branch 'origin/master' into feat/poll-message-w…
xsahil03x Dec 12, 2024
0ec3c7d
chore: merge fixes
xsahil03x Dec 12, 2024
6067df0
chore: update CHANGELOG.md
xsahil03x Dec 12, 2024
bfc5c38
chore: ignore line length lint for tests
xsahil03x Dec 12, 2024
ef2b2bf
revert: testing changes
xsahil03x Dec 12, 2024
d14ef7b
test: regenerate goldens
xsahil03x Dec 13, 2024
413d0e4
test: fix golden tests date
xsahil03x Dec 13, 2024
16035d1
test: fix golden tests date
xsahil03x Dec 13, 2024
08dc23e
add StreamPollOptionsDialogThemeData to StreamTheme
xsahil03x Dec 23, 2024
768fc62
Merge remote-tracking branch 'origin/master' into feat/poll-message-w…
xsahil03x Dec 24, 2024
8ee56a8
migrate the new golden tests to alchemist
xsahil03x Dec 24, 2024
0abc7a9
remove previous goldens
xsahil03x Dec 24, 2024
c4d8d7c
update action
xsahil03x Dec 24, 2024
7fb14dc
temp test
xsahil03x Dec 24, 2024
ebfc2d6
chore: Update Goldens
xsahil03x Dec 24, 2024
fdcdc02
revert test changes
xsahil03x Dec 24, 2024
cc3a5f1
remove fetch depth
xsahil03x Dec 24, 2024
c3f9988
apply review suggestions.
xsahil03x Dec 24, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions .github/workflows/update_goldens.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,8 @@ jobs:
update_goldens:
runs-on: ubuntu-latest
steps:
- name: 🚫 Ensure branch is not master
if: ${{ github.event.inputs.branch == 'master' || github.event.inputs.branch == 'origin/master'}}
run: |
echo "Updating goldens on 'master' branch is prohibited."
exit 1

- name: 📚 Checkout branch
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.branch }}

- name: 🐦 Install Flutter
uses: subosito/flutter-action@v2
Expand All @@ -32,10 +24,8 @@ jobs:
run: melos bootstrap --verbose

- name: 🖼️ Update Goldens
working-directory: packages/stream_chat_flutter
continue-on-error: true
run: |
flutter test --tags golden --update-goldens
run: melos run update:goldens

- name: 📤 Commit Changes
id: commit_changes
Expand Down
4 changes: 4 additions & 0 deletions melos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,10 @@ scripts:
flutter: true
dirExists: test

update:goldens:
run: melos exec -c 1 --depends-on="alchemist" -- "flutter test --tags golden --update-goldens"
description: Update golden files for all packages in this project.

clean:flutter:
run: melos exec -c 4 --fail-fast -- "flutter clean"
description: Run Flutter clean for a specific package in this project.
Expand Down
138 changes: 119 additions & 19 deletions packages/stream_chat/lib/src/client/channel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1035,6 +1035,8 @@
return _client.sendEvent(id!, type, event);
}

final _pollLock = Lock();

/// Send a message with a poll to this channel.
///
/// Optionally provide a [messageText] to send a message along with the poll.
Expand All @@ -1043,7 +1045,7 @@
String messageText = '',
}) async {
_checkInitialized();
final res = await _client.createPoll(poll);
final res = await _pollLock.synchronized(() => _client.createPoll(poll));

Check warning on line 1048 in packages/stream_chat/lib/src/client/channel.dart

View check run for this annotation

Codecov / codecov/patch

packages/stream_chat/lib/src/client/channel.dart#L1048

Added line #L1048 was not covered by tests
return sendMessage(
Message(
text: messageText,
Expand All @@ -1056,13 +1058,109 @@
/// Updates the [poll] in this channel.
Future<UpdatePollResponse> updatePoll(Poll poll) {
_checkInitialized();
return _client.updatePoll(poll);
return _pollLock.synchronized(() => _client.updatePoll(poll));

Check warning on line 1061 in packages/stream_chat/lib/src/client/channel.dart

View check run for this annotation

Codecov / codecov/patch

packages/stream_chat/lib/src/client/channel.dart#L1061

Added line #L1061 was not covered by tests
}

/// Deletes the given [poll] from this channel.
Future<EmptyResponse> deletePoll(Poll poll) {
_checkInitialized();
return _pollLock.synchronized(() => _client.deletePoll(poll.id));

Check warning on line 1067 in packages/stream_chat/lib/src/client/channel.dart

View check run for this annotation

Codecov / codecov/patch

packages/stream_chat/lib/src/client/channel.dart#L1065-L1067

Added lines #L1065 - L1067 were not covered by tests
}

/// Close the given [poll].
Future<UpdatePollResponse> closePoll(Poll poll) {
_checkInitialized();
return _pollLock.synchronized(() => _client.closePoll(poll.id));

Check warning on line 1073 in packages/stream_chat/lib/src/client/channel.dart

View check run for this annotation

Codecov / codecov/patch

packages/stream_chat/lib/src/client/channel.dart#L1071-L1073

Added lines #L1071 - L1073 were not covered by tests
}

/// Deletes the poll with the given [pollId] from this channel.
Future<EmptyResponse> deletePoll(String pollId) {
/// Create a new poll option for the given [poll].
Future<CreatePollOptionResponse> createPollOption(

Check warning on line 1077 in packages/stream_chat/lib/src/client/channel.dart

View check run for this annotation

Codecov / codecov/patch

packages/stream_chat/lib/src/client/channel.dart#L1077

Added line #L1077 was not covered by tests
Poll poll,
PollOption option,
) {
_checkInitialized();
return _pollLock.synchronized(
() => _client.createPollOption(poll.id, option),

Check warning on line 1083 in packages/stream_chat/lib/src/client/channel.dart

View check run for this annotation

Codecov / codecov/patch

packages/stream_chat/lib/src/client/channel.dart#L1081-L1083

Added lines #L1081 - L1083 were not covered by tests
);
}

final _pollVoteLock = Lock();

/// Cast a vote on the given [poll] with the given [option].
Future<CastPollVoteResponse> castPollVote(

Check warning on line 1090 in packages/stream_chat/lib/src/client/channel.dart

View check run for this annotation

Codecov / codecov/patch

packages/stream_chat/lib/src/client/channel.dart#L1090

Added line #L1090 was not covered by tests
Message message,
Poll poll,
PollOption option,
) async {
_checkInitialized();
return _client.deletePoll(pollId);

final optionId = option.id;

Check warning on line 1097 in packages/stream_chat/lib/src/client/channel.dart

View check run for this annotation

Codecov / codecov/patch

packages/stream_chat/lib/src/client/channel.dart#L1097

Added line #L1097 was not covered by tests
if (optionId == null) {
throw ArgumentError('Option id cannot be null');

Check warning on line 1099 in packages/stream_chat/lib/src/client/channel.dart

View check run for this annotation

Codecov / codecov/patch

packages/stream_chat/lib/src/client/channel.dart#L1099

Added line #L1099 was not covered by tests
}

return _pollVoteLock.synchronized(
() => _client.castPollVote(
message.id,
poll.id,

Check warning on line 1105 in packages/stream_chat/lib/src/client/channel.dart

View check run for this annotation

Codecov / codecov/patch

packages/stream_chat/lib/src/client/channel.dart#L1102-L1105

Added lines #L1102 - L1105 were not covered by tests
optionId: optionId,
),
);
}

/// Add a new answer to the given [poll].
Future<CastPollVoteResponse> addPollAnswer(

Check warning on line 1112 in packages/stream_chat/lib/src/client/channel.dart

View check run for this annotation

Codecov / codecov/patch

packages/stream_chat/lib/src/client/channel.dart#L1112

Added line #L1112 was not covered by tests
Message message,
Poll poll, {
required String answerText,
}) {
_checkInitialized();
return _pollVoteLock.synchronized(
() => _client.addPollAnswer(
message.id,
poll.id,

Check warning on line 1121 in packages/stream_chat/lib/src/client/channel.dart

View check run for this annotation

Codecov / codecov/patch

packages/stream_chat/lib/src/client/channel.dart#L1117-L1121

Added lines #L1117 - L1121 were not covered by tests
answerText: answerText,
),
);
}

/// Remove a vote on the given [poll] with the given [vote].
Future<RemovePollVoteResponse> removePollVote(

Check warning on line 1128 in packages/stream_chat/lib/src/client/channel.dart

View check run for this annotation

Codecov / codecov/patch

packages/stream_chat/lib/src/client/channel.dart#L1128

Added line #L1128 was not covered by tests
Message message,
Poll poll,
PollVote vote,
) {
_checkInitialized();

Check warning on line 1133 in packages/stream_chat/lib/src/client/channel.dart

View check run for this annotation

Codecov / codecov/patch

packages/stream_chat/lib/src/client/channel.dart#L1133

Added line #L1133 was not covered by tests

final voteId = vote.id;

Check warning on line 1135 in packages/stream_chat/lib/src/client/channel.dart

View check run for this annotation

Codecov / codecov/patch

packages/stream_chat/lib/src/client/channel.dart#L1135

Added line #L1135 was not covered by tests
if (voteId == null) {
throw ArgumentError('Vote id cannot be null');

Check warning on line 1137 in packages/stream_chat/lib/src/client/channel.dart

View check run for this annotation

Codecov / codecov/patch

packages/stream_chat/lib/src/client/channel.dart#L1137

Added line #L1137 was not covered by tests
}

return _pollVoteLock.synchronized(
() => _client.removePollVote(
message.id,
poll.id,

Check warning on line 1143 in packages/stream_chat/lib/src/client/channel.dart

View check run for this annotation

Codecov / codecov/patch

packages/stream_chat/lib/src/client/channel.dart#L1140-L1143

Added lines #L1140 - L1143 were not covered by tests
voteId,
),
);
}

/// Query the poll votes for the given [pollId] with the given [filter] and
/// [sort] options.
Future<QueryPollVotesResponse> queryPollVotes(

Check warning on line 1151 in packages/stream_chat/lib/src/client/channel.dart

View check run for this annotation

Codecov / codecov/patch

packages/stream_chat/lib/src/client/channel.dart#L1151

Added line #L1151 was not covered by tests
String pollId, {
Filter? filter,
List<SortOption>? sort,
PaginationParams pagination = const PaginationParams(),
}) {
_checkInitialized();
return _client.queryPollVotes(

Check warning on line 1158 in packages/stream_chat/lib/src/client/channel.dart

View check run for this annotation

Codecov / codecov/patch

packages/stream_chat/lib/src/client/channel.dart#L1157-L1158

Added lines #L1157 - L1158 were not covered by tests
pollId,
filter: filter,
sort: sort,
pagination: pagination,
);
}

/// Send a reaction to this channel.
Expand Down Expand Up @@ -2120,12 +2218,12 @@

final oldPoll = pollMessage.poll;

final answers = oldPoll?.answers ?? eventPoll.answers;
final latestAnswers = oldPoll?.latestAnswers ?? eventPoll.latestAnswers;

Check warning on line 2221 in packages/stream_chat/lib/src/client/channel.dart

View check run for this annotation

Codecov / codecov/patch

packages/stream_chat/lib/src/client/channel.dart#L2221

Added line #L2221 was not covered by tests
final ownVotesAndAnswers =
oldPoll?.ownVotesAndAnswers ?? eventPoll.ownVotesAndAnswers;

final poll = eventPoll.copyWith(
answers: answers,
latestAnswers: latestAnswers,
ownVotesAndAnswers: ownVotesAndAnswers,
);

Expand Down Expand Up @@ -2160,8 +2258,8 @@

final oldPoll = pollMessage.poll;

final answers = <String, PollVote>{
for (final ans in oldPoll?.answers ?? []) ans.id: ans,
final latestAnswers = <String, PollVote>{
for (final ans in oldPoll?.latestAnswers ?? []) ans.id: ans,

Check warning on line 2262 in packages/stream_chat/lib/src/client/channel.dart

View check run for this annotation

Codecov / codecov/patch

packages/stream_chat/lib/src/client/channel.dart#L2261-L2262

Added lines #L2261 - L2262 were not covered by tests
eventPollVote.id!: eventPollVote,
};

Expand All @@ -2173,7 +2271,7 @@
};

final poll = eventPoll.copyWith(
answers: [...answers.values],
latestAnswers: [...latestAnswers.values],

Check warning on line 2274 in packages/stream_chat/lib/src/client/channel.dart

View check run for this annotation

Codecov / codecov/patch

packages/stream_chat/lib/src/client/channel.dart#L2274

Added line #L2274 was not covered by tests
ownVotesAndAnswers: [...ownVotesAndAnswers.values],
);

Expand All @@ -2192,7 +2290,7 @@

final oldPoll = pollMessage.poll;

final answers = oldPoll?.answers ?? eventPoll.answers;
final latestAnswers = oldPoll?.latestAnswers ?? eventPoll.latestAnswers;

Check warning on line 2293 in packages/stream_chat/lib/src/client/channel.dart

View check run for this annotation

Codecov / codecov/patch

packages/stream_chat/lib/src/client/channel.dart#L2293

Added line #L2293 was not covered by tests
final currentUserId = _channel.client.state.currentUser?.id;
final ownVotesAndAnswers = <String, PollVote>{
for (final vote in oldPoll?.ownVotesAndAnswers ?? []) vote.id: vote,
Expand All @@ -2201,7 +2299,7 @@
};

final poll = eventPoll.copyWith(
answers: answers,
latestAnswers: latestAnswers,
ownVotesAndAnswers: [...ownVotesAndAnswers.values],
);

Expand All @@ -2220,16 +2318,16 @@

final oldPoll = pollMessage.poll;

final answers = <String, PollVote>{
for (final ans in oldPoll?.answers ?? []) ans.id: ans,
final latestAnswers = <String, PollVote>{
for (final ans in oldPoll?.latestAnswers ?? []) ans.id: ans,

Check warning on line 2322 in packages/stream_chat/lib/src/client/channel.dart

View check run for this annotation

Codecov / codecov/patch

packages/stream_chat/lib/src/client/channel.dart#L2321-L2322

Added lines #L2321 - L2322 were not covered by tests
}..remove(eventPollVote.id);

final ownVotesAndAnswers = <String, PollVote>{
for (final vote in oldPoll?.ownVotesAndAnswers ?? []) vote.id: vote,
}..remove(eventPollVote.id);

final poll = eventPoll.copyWith(
answers: [...answers.values],
latestAnswers: [...latestAnswers.values],

Check warning on line 2330 in packages/stream_chat/lib/src/client/channel.dart

View check run for this annotation

Codecov / codecov/patch

packages/stream_chat/lib/src/client/channel.dart#L2330

Added line #L2330 was not covered by tests
ownVotesAndAnswers: [...ownVotesAndAnswers.values],
);

Expand All @@ -2248,13 +2346,13 @@

final oldPoll = pollMessage.poll;

final answers = oldPoll?.answers ?? eventPoll.answers;
final latestAnswers = oldPoll?.latestAnswers ?? eventPoll.latestAnswers;

Check warning on line 2349 in packages/stream_chat/lib/src/client/channel.dart

View check run for this annotation

Codecov / codecov/patch

packages/stream_chat/lib/src/client/channel.dart#L2349

Added line #L2349 was not covered by tests
final ownVotesAndAnswers = <String, PollVote>{
for (final vote in oldPoll?.ownVotesAndAnswers ?? []) vote.id: vote,
}..remove(eventPollVote.id);

final poll = eventPoll.copyWith(
answers: answers,
latestAnswers: latestAnswers,
ownVotesAndAnswers: [...ownVotesAndAnswers.values],
);

Expand All @@ -2273,7 +2371,7 @@

final oldPoll = pollMessage.poll;

final answers = oldPoll?.answers ?? eventPoll.answers;
final latestAnswers = oldPoll?.latestAnswers ?? eventPoll.latestAnswers;

Check warning on line 2374 in packages/stream_chat/lib/src/client/channel.dart

View check run for this annotation

Codecov / codecov/patch

packages/stream_chat/lib/src/client/channel.dart#L2374

Added line #L2374 was not covered by tests
final currentUserId = _channel.client.state.currentUser?.id;
final ownVotesAndAnswers = <String, PollVote>{
for (final vote in oldPoll?.ownVotesAndAnswers ?? []) vote.id: vote,
Expand All @@ -2282,7 +2380,7 @@
};

final poll = eventPoll.copyWith(
answers: answers,
latestAnswers: latestAnswers,
ownVotesAndAnswers: [...ownVotesAndAnswers.values],
);

Expand Down Expand Up @@ -2338,6 +2436,8 @@
threads[event.message?.parentId]
?.firstWhereOrNull((e) => e.id == event.message?.id);
final message = event.message!.copyWith(
poll: oldMessage?.poll,
pollId: oldMessage?.pollId,

Check warning on line 2440 in packages/stream_chat/lib/src/client/channel.dart

View check run for this annotation

Codecov / codecov/patch

packages/stream_chat/lib/src/client/channel.dart#L2439-L2440

Added lines #L2439 - L2440 were not covered by tests
ownReactions: oldMessage?.ownReactions,
);
updateMessage(message);
Expand Down
42 changes: 26 additions & 16 deletions packages/stream_chat/lib/src/core/models/poll.dart
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@
this.enforceUniqueVote = true,
this.maxVotesAllowed,
this.allowAnswers = false,
this.answers = const [],
this.latestAnswers = const [],
this.answersCount = 0,
this.allowUserSuggestedOptions = false,
this.isClosed = false,
DateTime? createdAt,
DateTime? updatedAt,
this.voteCountsByOption = const {},
this.voteCount = 0,
this.votesByOption = const {},
this.latestVotesByOption = const {},
this.createdById,
this.createdBy,
this.ownVotesAndAnswers = const [],
Expand Down Expand Up @@ -109,20 +109,18 @@
final Map<String, int> voteCountsByOption;

/// Map of latest votes by option.
@JsonKey(name: 'latest_votes_by_option', includeToJson: false)
final Map<String, List<PollVote>> votesByOption;
@JsonKey(includeToJson: false)
final Map<String, List<PollVote>> latestVotesByOption;

/// List of votes received by the poll.
///
/// Note: This does not include the answers provided by the users,
/// see [answers] for that.
List<PollVote> get votes => [
...votesByOption.values.flattened.where((it) => !it.isAnswer),
];
/// see [latestAnswers] for that.
late final latestVotes = [...latestVotesByOption.values.flattened];

/// List of latest answers received by the poll.
@JsonKey(name: 'latest_answers', includeToJson: false)
final List<PollVote> answers;
@JsonKey(includeToJson: false)
final List<PollVote> latestAnswers;

/// List of votes casted by the current user.
///
Expand All @@ -134,6 +132,18 @@
@JsonKey(includeToJson: false)
final int voteCount;

/// List of votes casted by the current user.
///
/// Note: This does not include the answers provided by the user,
/// see [ownAnswers] for that.
late final ownVotes = [...ownVotesAndAnswers.where((it) => !it.isAnswer)];

/// List of answers provided by the current user.
///
/// Note: This does not include the votes casted by the user,
/// see [ownVotes] for that.
late final ownAnswers = [...ownVotesAndAnswers.where((it) => it.isAnswer)];

/// The id of the user who created the poll.
@JsonKey(includeToJson: false)
final String? createdById;
Expand Down Expand Up @@ -173,8 +183,8 @@
List<PollVote>? ownVotesAndAnswers,
int? voteCount,
int? answersCount,
Map<String, List<PollVote>>? votesByOption,
List<PollVote>? answers,
Map<String, List<PollVote>>? latestVotesByOption,
List<PollVote>? latestAnswers,
String? createdById,
User? createdBy,
DateTime? createdAt,
Expand All @@ -199,8 +209,8 @@
ownVotesAndAnswers: ownVotesAndAnswers ?? this.ownVotesAndAnswers,
voteCount: voteCount ?? this.voteCount,
answersCount: answersCount ?? this.answersCount,
votesByOption: votesByOption ?? this.votesByOption,
answers: answers ?? this.answers,
latestVotesByOption: latestVotesByOption ?? this.latestVotesByOption,
latestAnswers: latestAnswers ?? this.latestAnswers,

Check warning on line 213 in packages/stream_chat/lib/src/core/models/poll.dart

View check run for this annotation

Codecov / codecov/patch

packages/stream_chat/lib/src/core/models/poll.dart#L212-L213

Added lines #L212 - L213 were not covered by tests
createdById: createdById ?? this.createdById,
createdBy: createdBy ?? this.createdBy,
createdAt: createdAt ?? this.createdAt,
Expand Down Expand Up @@ -251,8 +261,8 @@
ownVotesAndAnswers,
voteCount,
answersCount,
votesByOption,
answers,
latestVotesByOption,
latestAnswers,

Check warning on line 265 in packages/stream_chat/lib/src/core/models/poll.dart

View check run for this annotation

Codecov / codecov/patch

packages/stream_chat/lib/src/core/models/poll.dart#L264-L265

Added lines #L264 - L265 were not covered by tests
createdById,
createdBy,
createdAt,
Expand Down
Loading
Loading