remove deprecated stuff from older versions

This commit is contained in:
Salvatore Giordano
2022-05-02 17:45:06 +02:00
parent da627a6c8a
commit 6f6032441c
6 changed files with 1 additions and 96 deletions
@@ -101,14 +101,6 @@ class StreamMessageWidget extends StatefulWidget {
vertical: 8,
),
this.attachmentPadding = EdgeInsets.zero,
@Deprecated('''
allRead is now deprecated and it will be removed in future releases.
The MessageWidget now listens for read events on its own.
''') this.allRead = false,
@Deprecated('''
readList is now deprecated and it will be removed in future releases.
The MessageWidget now listens for read events on its own.
''') this.readList,
this.onQuotedMessageTap,
this.customActions = const [],
this.onAttachmentTap,
@@ -347,9 +339,6 @@ class StreamMessageWidget extends StatefulWidget {
/// If true the widget will show the reactions
final bool showReactions;
///
final bool allRead;
/// If true the widget will show the thread reply indicator
final bool showThreadReplyIndicator;
@@ -365,9 +354,6 @@ class StreamMessageWidget extends StatefulWidget {
/// Used in [StreamMessageReactionsModal] and [StreamMessageActionsModal]
final bool showReactionPickerIndicator;
/// List of users who read
final List<Read>? readList;
/// Callback when show message is tapped
final ShowMessageCallback? onShowMessage;
@@ -132,20 +132,6 @@ class StreamChatState extends State<StreamChat> {
return defaultTheme.merge(themeData);
}
// coverage:ignore-start
/// The current user
@Deprecated('Use `.currentUser` instead, Will be removed in future releases')
User? get user => widget.client.state.currentUser;
/// The current user as a stream
@Deprecated(
'Use `.currentUserStream` instead, Will be removed in future releases',
)
Stream<User?> get userStream => widget.client.state.currentUserStream;
// coverage:ignore-end
/// The current user
User? get currentUser => widget.client.state.currentUser;
@@ -190,8 +190,6 @@ class StreamMessageInput extends StatefulWidget {
this.idleSendButton,
this.activeSendButton,
this.showCommandsButton = true,
@Deprecated('''Use `userMentionsTileBuilder` instead. Will be removed in future release''')
this.mentionsTileBuilder,
this.userMentionsTileBuilder,
this.maxAttachmentSize = _kDefaultMaxAttachmentSize,
this.onError,
@@ -271,9 +269,6 @@ class StreamMessageInput extends StatefulWidget {
/// Send button widget in an active state
final Widget? activeSendButton;
/// Customize the tile for the mentions overlay.
final MentionTileBuilder? mentionsTileBuilder;
/// Customize the tile for the mentions overlay.
final UserMentionTileBuilder? userMentionsTileBuilder;
@@ -1154,19 +1149,6 @@ class StreamMessageInputState extends State<StreamMessageInput>
// ignore: cast_nullable_to_non_nullable
final renderObject = context.findRenderObject() as RenderBox;
var tileBuilder = widget.userMentionsTileBuilder;
if (tileBuilder == null && widget.mentionsTileBuilder != null) {
tileBuilder = (context, user) {
final member = Member(
user: user,
userId: user.id,
createdAt: user.createdAt,
updatedAt: user.updatedAt,
);
return widget.mentionsTileBuilder!(context, member);
};
}
return LayoutBuilder(
builder: (context, snapshot) => StreamUserMentionsOverlay(
query: query,
@@ -1177,7 +1159,7 @@ class StreamMessageInputState extends State<StreamMessageInput>
renderObject.size.width - 16,
min(400, (snapshot.maxHeight - renderObject.size.height - 16).abs()),
),
mentionsTileBuilder: tileBuilder,
mentionsTileBuilder: widget.userMentionsTileBuilder,
onMentionUserTap: (user) {
_effectiveController.addMentionedUser(user);
splits[splits.length - 1] = user.name;