Skip to content

Commit 3f41cff

Browse files
author
Franco Bugnano
committed
Break compatibility by changing the type of notify
1 parent 7bbca10 commit 3f41cff

File tree

2 files changed

+5
-18
lines changed

2 files changed

+5
-18
lines changed

lib/src/chatbox.dart

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -517,12 +517,7 @@ class ChatBoxState extends State<ChatBox> {
517517
}
518518

519519
if (participant.notify != null) {
520-
result['notify'] = participant.notify;
521-
}
522-
523-
// This overrides the deprecated `notify` property if provided
524-
if (participant.notification != null) {
525-
result['notify'] = participant.notification!.getValue();
520+
result['notify'] = participant.notify!.getValue();
526521
}
527522

528523
execute('$variableName.setParticipant($userVariableName, ${json.encode(result)});');

lib/src/conversation.dart

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -43,18 +43,14 @@ class Participant {
4343

4444
final ParticipantAccess? access;
4545

46-
/// Deprecated. Use the notification property instead
47-
final bool? notify;
46+
final ParticipantNotification? notify;
4847

49-
final ParticipantNotification? notification;
50-
51-
const Participant(this.user, {this.access, this.notify, this.notification});
48+
const Participant(this.user, {this.access, this.notify});
5249

5350
Participant.of(Participant other)
5451
: user = User.of(other.user),
5552
access = other.access,
56-
notify = other.notify,
57-
notification = other.notification;
53+
notify = other.notify;
5854

5955
bool operator ==(Object other) {
6056
if (identical(this, other)) {
@@ -77,14 +73,10 @@ class Participant {
7773
return false;
7874
}
7975

80-
if (notification != other.notification) {
81-
return false;
82-
}
83-
8476
return true;
8577
}
8678

87-
int get hashCode => hashValues(user, access, notify, notification);
79+
int get hashCode => hashValues(user, access, notify);
8880
}
8981

9082
/// This represents a conversation that is about to be created, fetched, or

0 commit comments

Comments
 (0)