Merge branch 'develop' into hotfix/messagePagination
This commit is contained in:
@@ -5,9 +5,9 @@ import 'package:stream_chat_flutter/stream_chat_flutter.dart';
|
||||
class StreamCountdownButton extends StatelessWidget {
|
||||
/// Constructor for creating [StreamCountdownButton].
|
||||
const StreamCountdownButton({
|
||||
Key? key,
|
||||
super.key,
|
||||
required this.count,
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
/// Count of time remaining to show to the user.
|
||||
final int count;
|
||||
|
||||
@@ -4,10 +4,10 @@ import 'package:flutter/material.dart';
|
||||
class SimpleSafeArea extends StatelessWidget {
|
||||
/// Constructor for [SimpleSafeArea]
|
||||
const SimpleSafeArea({
|
||||
Key? key,
|
||||
super.key,
|
||||
this.enabled = true,
|
||||
required this.child,
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
/// Wrap [child] with [SafeArea]
|
||||
final bool enabled;
|
||||
|
||||
@@ -25,7 +25,7 @@ class StreamAttachmentPicker extends StatefulWidget {
|
||||
/// Default constructor for [StreamAttachmentPicker] which creates the Stream
|
||||
/// attachment picker widget.
|
||||
const StreamAttachmentPicker({
|
||||
Key? key,
|
||||
super.key,
|
||||
required this.messageInputController,
|
||||
required this.onFilePicked,
|
||||
this.isOpen = false,
|
||||
@@ -40,7 +40,7 @@ class StreamAttachmentPicker extends StatefulWidget {
|
||||
DefaultAttachmentTypes.video,
|
||||
],
|
||||
this.customAttachmentTypes = const [],
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
/// True if the picker is open.
|
||||
final bool isOpen;
|
||||
@@ -179,7 +179,7 @@ class _StreamAttachmentPickerState extends State<StreamAttachmentPicker> {
|
||||
|
||||
return AnimatedContainer(
|
||||
duration:
|
||||
widget.isOpen ? const Duration(milliseconds: 300) : const Duration(),
|
||||
widget.isOpen ? const Duration(milliseconds: 300) : Duration.zero,
|
||||
curve: Curves.easeOut,
|
||||
height: widget.isOpen ? widget.pickerSize : 0,
|
||||
child: SingleChildScrollView(
|
||||
@@ -245,7 +245,7 @@ class _StreamAttachmentPickerState extends State<StreamAttachmentPicker> {
|
||||
if (widget.allowedAttachmentTypes
|
||||
.contains(DefaultAttachmentTypes.video))
|
||||
IconButton(
|
||||
padding: const EdgeInsets.all(0),
|
||||
padding: EdgeInsets.zero,
|
||||
icon: StreamSvgIcon.record(
|
||||
color: _getIconColor(3),
|
||||
),
|
||||
@@ -424,7 +424,6 @@ class _StreamAttachmentPickerState extends State<StreamAttachmentPicker> {
|
||||
|
||||
class _PickerWidget extends StatefulWidget {
|
||||
const _PickerWidget({
|
||||
Key? key,
|
||||
required this.filePickerIndex,
|
||||
required this.containsFile,
|
||||
required this.selectedMedias,
|
||||
@@ -434,7 +433,7 @@ class _PickerWidget extends StatefulWidget {
|
||||
required this.allowedAttachmentTypes,
|
||||
required this.customAttachmentTypes,
|
||||
required this.mediaListViewController,
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
final int filePickerIndex;
|
||||
final bool containsFile;
|
||||
@@ -506,7 +505,7 @@ class _PickerWidgetState extends State<_PickerWidget> {
|
||||
onTap: () async {
|
||||
PhotoManager.openSetting();
|
||||
},
|
||||
child: Container(
|
||||
child: ColoredBox(
|
||||
color: widget.streamChatTheme.colorTheme.inputBg,
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
|
||||
@@ -175,7 +175,7 @@ const _kDefaultMaxAttachmentSize = 20971520; // 20MB in Bytes
|
||||
class StreamMessageInput extends StatefulWidget {
|
||||
/// Instantiate a new MessageInput
|
||||
const StreamMessageInput({
|
||||
Key? key,
|
||||
super.key,
|
||||
this.onMessageSent,
|
||||
this.preMessageSending,
|
||||
this.maxHeight = 150,
|
||||
@@ -210,10 +210,11 @@ class StreamMessageInput extends StatefulWidget {
|
||||
this.elevation,
|
||||
this.shadow,
|
||||
this.autoCorrect = true,
|
||||
this.disableEmojiSuggestionsOverlay = false,
|
||||
@Deprecated('Please use enableEmojiSuggestionsOverlay')
|
||||
this.disableEmojiSuggestionsOverlay = false,
|
||||
this.enableEmojiSuggestionsOverlay = true,
|
||||
this.enableMentionsOverlay = true,
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
/// List of options for showing overlays.
|
||||
final List<OverlayOptions> customOverlays;
|
||||
@@ -607,6 +608,7 @@ class StreamMessageInputState extends State<StreamMessageInput>
|
||||
widget: _buildCommandsOverlayEntry(),
|
||||
),
|
||||
if (widget.enableEmojiSuggestionsOverlay &&
|
||||
// ignore: deprecated_member_use_from_same_package
|
||||
!widget.disableEmojiSuggestionsOverlay)
|
||||
OverlayOptions(
|
||||
visible: _focusNode.hasFocus &&
|
||||
@@ -746,7 +748,7 @@ class StreamMessageInputState extends State<StreamMessageInput>
|
||||
color: _messageInputTheme.expandButtonColor,
|
||||
),
|
||||
),
|
||||
padding: const EdgeInsets.all(0),
|
||||
padding: EdgeInsets.zero,
|
||||
constraints: const BoxConstraints.tightFor(
|
||||
height: 24,
|
||||
width: 24,
|
||||
@@ -918,7 +920,7 @@ class StreamMessageInputState extends State<StreamMessageInput>
|
||||
child: IconButton(
|
||||
icon: StreamSvgIcon.closeSmall(),
|
||||
splashRadius: 24,
|
||||
padding: const EdgeInsets.all(0),
|
||||
padding: EdgeInsets.zero,
|
||||
constraints: const BoxConstraints.tightFor(
|
||||
height: 24,
|
||||
width: 24,
|
||||
@@ -1404,9 +1406,9 @@ class StreamMessageInputState extends State<StreamMessageInput>
|
||||
],
|
||||
);
|
||||
default:
|
||||
return Container(
|
||||
return const ColoredBox(
|
||||
color: Colors.black26,
|
||||
child: const Icon(Icons.insert_drive_file),
|
||||
child: Icon(Icons.insert_drive_file),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1421,7 +1423,7 @@ class StreamMessageInputState extends State<StreamMessageInput>
|
||||
? _messageInputTheme.actionButtonColor
|
||||
: _messageInputTheme.actionButtonIdleColor),
|
||||
),
|
||||
padding: const EdgeInsets.all(0),
|
||||
padding: EdgeInsets.zero,
|
||||
constraints: const BoxConstraints.tightFor(
|
||||
height: 24,
|
||||
width: 24,
|
||||
@@ -1450,7 +1452,7 @@ class StreamMessageInputState extends State<StreamMessageInput>
|
||||
? _messageInputTheme.actionButtonColor
|
||||
: _messageInputTheme.actionButtonIdleColor,
|
||||
),
|
||||
padding: const EdgeInsets.all(0),
|
||||
padding: EdgeInsets.zero,
|
||||
constraints: const BoxConstraints.tightFor(
|
||||
height: 24,
|
||||
width: 24,
|
||||
@@ -1811,10 +1813,10 @@ class StreamMessageInputState extends State<StreamMessageInput>
|
||||
class OGAttachmentPreview extends StatelessWidget {
|
||||
/// Returns a new instance of [OGAttachmentPreview]
|
||||
const OGAttachmentPreview({
|
||||
Key? key,
|
||||
super.key,
|
||||
required this.attachment,
|
||||
this.onDismissPreviewPressed,
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
/// The attachment to be rendered.
|
||||
final Attachment attachment;
|
||||
|
||||
+3
-3
@@ -7,7 +7,7 @@ class StreamMessageSendButton extends StatelessWidget {
|
||||
/// [isCommandEnabled], [isEditEnabled], [idleSendButton], [activeSendButton],
|
||||
/// [onSendMessage].
|
||||
const StreamMessageSendButton({
|
||||
Key? key,
|
||||
super.key,
|
||||
this.timeOut = 0,
|
||||
this.isIdle = true,
|
||||
this.isCommandEnabled = false,
|
||||
@@ -15,7 +15,7 @@ class StreamMessageSendButton extends StatelessWidget {
|
||||
this.idleSendButton,
|
||||
this.activeSendButton,
|
||||
required this.onSendMessage,
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
/// Time out related to slow mode.
|
||||
final int timeOut;
|
||||
@@ -81,7 +81,7 @@ class StreamMessageSendButton extends StatelessWidget {
|
||||
padding: const EdgeInsets.all(8),
|
||||
child: IconButton(
|
||||
onPressed: onSendMessage,
|
||||
padding: const EdgeInsets.all(0),
|
||||
padding: EdgeInsets.zero,
|
||||
splashRadius: 24,
|
||||
constraints: const BoxConstraints.tightFor(
|
||||
height: 24,
|
||||
|
||||
+2
-3
@@ -67,7 +67,7 @@ class StreamMessageTextField extends StatefulWidget {
|
||||
/// * [maxLength], which discusses the precise meaning of "number of
|
||||
/// characters" and how it may differ from the intuitive meaning.
|
||||
const StreamMessageTextField({
|
||||
Key? key,
|
||||
super.key,
|
||||
this.controller,
|
||||
this.focusNode,
|
||||
this.decoration = const InputDecoration(),
|
||||
@@ -176,8 +176,7 @@ class StreamMessageTextField extends StatefulWidget {
|
||||
cut: true,
|
||||
selectAll: true,
|
||||
paste: true,
|
||||
)),
|
||||
super(key: key);
|
||||
));
|
||||
|
||||
/// Controls the message being edited.
|
||||
///
|
||||
|
||||
+2
-2
@@ -14,13 +14,13 @@ import 'package:stream_chat_flutter/stream_chat_flutter.dart';
|
||||
class StreamChannelGridTile extends StatelessWidget {
|
||||
/// Creates a new instance of [StreamChannelGridTile] widget.
|
||||
const StreamChannelGridTile({
|
||||
Key? key,
|
||||
super.key,
|
||||
required this.channel,
|
||||
this.child,
|
||||
this.footer,
|
||||
this.onTap,
|
||||
this.onLongPress,
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
/// The channel to display.
|
||||
final Channel channel;
|
||||
|
||||
+2
-2
@@ -44,7 +44,7 @@ typedef StreamChannelGridViewIndexedWidgetBuilder
|
||||
class StreamChannelGridView extends StatelessWidget {
|
||||
/// Creates a new instance of [StreamChannelGridView].
|
||||
const StreamChannelGridView({
|
||||
Key? key,
|
||||
super.key,
|
||||
required this.controller,
|
||||
this.gridDelegate = defaultChannelGridViewDelegate,
|
||||
this.itemBuilder,
|
||||
@@ -72,7 +72,7 @@ class StreamChannelGridView extends StatelessWidget {
|
||||
this.keyboardDismissBehavior = ScrollViewKeyboardDismissBehavior.manual,
|
||||
this.restorationId,
|
||||
this.clipBehavior = Clip.hardEdge,
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
/// The [StreamUserListController] used to control the grid of users.
|
||||
final StreamChannelListController controller;
|
||||
|
||||
+12
-16
@@ -17,7 +17,7 @@ import 'package:stream_chat_flutter/stream_chat_flutter.dart';
|
||||
class StreamChannelListTile extends StatelessWidget {
|
||||
/// Creates a new instance of [StreamChannelListTile] widget.
|
||||
StreamChannelListTile({
|
||||
Key? key,
|
||||
super.key,
|
||||
required this.channel,
|
||||
this.leading,
|
||||
this.title,
|
||||
@@ -30,11 +30,10 @@ class StreamChannelListTile extends StatelessWidget {
|
||||
this.contentPadding = const EdgeInsets.symmetric(horizontal: 8),
|
||||
this.unreadIndicatorBuilder,
|
||||
this.sendingIndicatorBuilder,
|
||||
}) : assert(
|
||||
}) : assert(
|
||||
channel.state != null,
|
||||
'Channel ${channel.id} is not initialized',
|
||||
),
|
||||
super(key: key);
|
||||
);
|
||||
|
||||
/// The channel to display.
|
||||
final Channel channel;
|
||||
@@ -228,14 +227,13 @@ class StreamChannelListTile extends StatelessWidget {
|
||||
class ChannelLastMessageDate extends StatelessWidget {
|
||||
/// Creates a new instance of the [ChannelLastMessageDate] widget.
|
||||
ChannelLastMessageDate({
|
||||
Key? key,
|
||||
super.key,
|
||||
required this.channel,
|
||||
this.textStyle,
|
||||
}) : assert(
|
||||
}) : assert(
|
||||
channel.state != null,
|
||||
'Channel ${channel.id} is not initialized',
|
||||
),
|
||||
super(key: key);
|
||||
);
|
||||
|
||||
/// The channel to display the last message date for.
|
||||
final Channel channel;
|
||||
@@ -281,14 +279,13 @@ class ChannelLastMessageDate extends StatelessWidget {
|
||||
class ChannelListTileSubtitle extends StatelessWidget {
|
||||
/// Creates a new instance of [StreamChannelListTileSubtitle] widget.
|
||||
ChannelListTileSubtitle({
|
||||
Key? key,
|
||||
super.key,
|
||||
required this.channel,
|
||||
this.textStyle,
|
||||
}) : assert(
|
||||
}) : assert(
|
||||
channel.state != null,
|
||||
'Channel ${channel.id} is not initialized',
|
||||
),
|
||||
super(key: key);
|
||||
);
|
||||
|
||||
/// The channel to create the subtitle from.
|
||||
final Channel channel;
|
||||
@@ -325,14 +322,13 @@ class ChannelListTileSubtitle extends StatelessWidget {
|
||||
class ChannelLastMessageText extends StatelessWidget {
|
||||
/// Creates a new instance of [ChannelLastMessageText] widget.
|
||||
ChannelLastMessageText({
|
||||
Key? key,
|
||||
super.key,
|
||||
required this.channel,
|
||||
this.textStyle,
|
||||
}) : assert(
|
||||
}) : assert(
|
||||
channel.state != null,
|
||||
'Channel ${channel.id} is not initialized',
|
||||
),
|
||||
super(key: key);
|
||||
);
|
||||
|
||||
/// The channel to display the last message of.
|
||||
final Channel channel;
|
||||
|
||||
+5
-5
@@ -52,7 +52,7 @@ typedef StreamChannelListViewIndexedWidgetBuilder
|
||||
class StreamChannelListView extends StatelessWidget {
|
||||
/// Creates a new instance of [StreamChannelListView].
|
||||
const StreamChannelListView({
|
||||
Key? key,
|
||||
super.key,
|
||||
required this.controller,
|
||||
this.itemBuilder,
|
||||
this.separatorBuilder = defaultChannelListViewSeparatorBuilder,
|
||||
@@ -77,7 +77,7 @@ class StreamChannelListView extends StatelessWidget {
|
||||
this.keyboardDismissBehavior = ScrollViewKeyboardDismissBehavior.manual,
|
||||
this.restorationId,
|
||||
this.clipBehavior = Clip.hardEdge,
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
/// The [StreamChannelListController] used to control the list of channels.
|
||||
final StreamChannelListController controller;
|
||||
@@ -375,7 +375,7 @@ class StreamChannelListView extends StatelessWidget {
|
||||
/// [StreamChannelListTile] items.
|
||||
class StreamChannelListSeparator extends StatelessWidget {
|
||||
/// Creates a new instance of [StreamChannelListSeparator].
|
||||
const StreamChannelListSeparator({Key? key}) : super(key: key);
|
||||
const StreamChannelListSeparator({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -392,9 +392,9 @@ class StreamChannelListSeparator extends StatelessWidget {
|
||||
class StreamChannelListErrorWidget extends StatelessWidget {
|
||||
/// Creates a new instance of [StreamChannelListErrorWidget] widget.
|
||||
const StreamChannelListErrorWidget({
|
||||
Key? key,
|
||||
super.key,
|
||||
this.onPressed,
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
/// The callback to invoke when the user taps on the retry button.
|
||||
final VoidCallback? onPressed;
|
||||
|
||||
+2
-2
@@ -37,7 +37,7 @@ typedef StreamMessageSearchGridViewIndexedWidgetBuilder
|
||||
class StreamMessageSearchGridView extends StatelessWidget {
|
||||
/// Creates a new instance of [StreamMessageSearchGridView].
|
||||
const StreamMessageSearchGridView({
|
||||
Key? key,
|
||||
super.key,
|
||||
required this.controller,
|
||||
required this.itemBuilder,
|
||||
this.gridDelegate = defaultMessageSearchGridViewDelegate,
|
||||
@@ -63,7 +63,7 @@ class StreamMessageSearchGridView extends StatelessWidget {
|
||||
this.keyboardDismissBehavior = ScrollViewKeyboardDismissBehavior.manual,
|
||||
this.restorationId,
|
||||
this.clipBehavior = Clip.hardEdge,
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
/// The [StreamUserListController] used to control the grid of users.
|
||||
final StreamMessageSearchListController controller;
|
||||
|
||||
+6
-6
@@ -15,7 +15,7 @@ import 'package:stream_chat_flutter/stream_chat_flutter.dart';
|
||||
class StreamMessageSearchListTile extends StatelessWidget {
|
||||
/// Creates a new instance of [StreamMessageSearchListTile].
|
||||
const StreamMessageSearchListTile({
|
||||
Key? key,
|
||||
super.key,
|
||||
required this.messageResponse,
|
||||
this.leading,
|
||||
this.title,
|
||||
@@ -26,7 +26,7 @@ class StreamMessageSearchListTile extends StatelessWidget {
|
||||
this.tileColor,
|
||||
this.visualDensity = VisualDensity.compact,
|
||||
this.contentPadding = const EdgeInsets.symmetric(horizontal: 8),
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
/// The message response to display.
|
||||
final GetMessageResponse messageResponse;
|
||||
@@ -161,10 +161,10 @@ class StreamMessageSearchListTile extends StatelessWidget {
|
||||
class MessageSearchListTileTitle extends StatelessWidget {
|
||||
/// Creates a new [MessageSearchListTileTitle] instance.
|
||||
const MessageSearchListTileTitle({
|
||||
Key? key,
|
||||
super.key,
|
||||
required this.messageResponse,
|
||||
this.textStyle,
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
/// The message response for the tile.
|
||||
final GetMessageResponse messageResponse;
|
||||
@@ -207,10 +207,10 @@ class MessageSearchListTileTitle extends StatelessWidget {
|
||||
class MessageSearchTileMessageDate extends StatelessWidget {
|
||||
/// Creates a new instance of [MessageSearchTileMessageDate].
|
||||
const MessageSearchTileMessageDate({
|
||||
Key? key,
|
||||
super.key,
|
||||
required this.message,
|
||||
this.textStyle,
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
/// The searched message response.
|
||||
final Message message;
|
||||
|
||||
+3
-3
@@ -49,7 +49,7 @@ typedef StreamMessageSearchListViewIndexedWidgetBuilder
|
||||
class StreamMessageSearchListView extends StatelessWidget {
|
||||
/// Creates a new instance of [StreamMessageSearchListView].
|
||||
const StreamMessageSearchListView({
|
||||
Key? key,
|
||||
super.key,
|
||||
required this.controller,
|
||||
this.itemBuilder,
|
||||
this.separatorBuilder = defaultMessageSearchListViewSeparatorBuilder,
|
||||
@@ -74,7 +74,7 @@ class StreamMessageSearchListView extends StatelessWidget {
|
||||
this.keyboardDismissBehavior = ScrollViewKeyboardDismissBehavior.manual,
|
||||
this.restorationId,
|
||||
this.clipBehavior = Clip.hardEdge,
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
/// The [StreamUserListController] used to control the list of
|
||||
/// searched messages.
|
||||
@@ -373,7 +373,7 @@ class StreamMessageSearchListView extends StatelessWidget {
|
||||
/// [StreamMessageSearchListTile] items.
|
||||
class StreamMessageSearchListSeparator extends StatelessWidget {
|
||||
/// Creates a new instance of [StreamMessageSearchListSeparator].
|
||||
const StreamMessageSearchListSeparator({Key? key}) : super(key: key);
|
||||
const StreamMessageSearchListSeparator({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
+2
-2
@@ -6,14 +6,14 @@ import 'package:stream_chat_flutter/src/stream_chat_theme.dart';
|
||||
class StreamScrollViewEmptyWidget extends StatelessWidget {
|
||||
/// Creates a new instance of the [StreamScrollViewEmptyWidget].
|
||||
const StreamScrollViewEmptyWidget({
|
||||
Key? key,
|
||||
super.key,
|
||||
required this.emptyIcon,
|
||||
required this.emptyTitle,
|
||||
this.emptyTitleStyle,
|
||||
this.mainAxisSize = MainAxisSize.max,
|
||||
this.mainAxisAlignment = MainAxisAlignment.center,
|
||||
this.crossAxisAlignment = CrossAxisAlignment.center,
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
/// The title of the empty view.
|
||||
final Widget emptyTitle;
|
||||
|
||||
+2
-2
@@ -7,7 +7,7 @@ import 'package:stream_chat_flutter/src/stream_chat_theme.dart';
|
||||
class StreamScrollViewErrorWidget extends StatelessWidget {
|
||||
/// Creates a new instance of the [StreamScrollViewErrorWidget].
|
||||
const StreamScrollViewErrorWidget({
|
||||
Key? key,
|
||||
super.key,
|
||||
this.errorTitle,
|
||||
this.errorTitleStyle,
|
||||
this.errorIcon,
|
||||
@@ -17,7 +17,7 @@ class StreamScrollViewErrorWidget extends StatelessWidget {
|
||||
this.mainAxisSize = MainAxisSize.max,
|
||||
this.mainAxisAlignment = MainAxisAlignment.center,
|
||||
this.crossAxisAlignment = CrossAxisAlignment.center,
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
/// The title of the error.
|
||||
final Widget? errorTitle;
|
||||
|
||||
+5
-7
@@ -7,7 +7,7 @@ import 'package:stream_chat_flutter/src/stream_svg_icon.dart';
|
||||
class StreamScrollViewLoadMoreError extends StatelessWidget {
|
||||
/// Creates a new instance of [StreamScrollViewLoadMoreError.list].
|
||||
const StreamScrollViewLoadMoreError.list({
|
||||
Key? key,
|
||||
super.key,
|
||||
this.error,
|
||||
this.errorStyle,
|
||||
this.errorIcon,
|
||||
@@ -17,12 +17,11 @@ class StreamScrollViewLoadMoreError extends StatelessWidget {
|
||||
this.mainAxisSize = MainAxisSize.max,
|
||||
this.mainAxisAlignment = MainAxisAlignment.spaceBetween,
|
||||
this.crossAxisAlignment = CrossAxisAlignment.center,
|
||||
}) : _isList = true,
|
||||
super(key: key);
|
||||
}) : _isList = true;
|
||||
|
||||
/// Creates a new instance of [StreamScrollViewLoadMoreError.grid].
|
||||
const StreamScrollViewLoadMoreError.grid({
|
||||
Key? key,
|
||||
super.key,
|
||||
this.error,
|
||||
this.errorStyle,
|
||||
this.errorIcon,
|
||||
@@ -32,8 +31,7 @@ class StreamScrollViewLoadMoreError extends StatelessWidget {
|
||||
this.mainAxisSize = MainAxisSize.max,
|
||||
this.mainAxisAlignment = MainAxisAlignment.spaceEvenly,
|
||||
this.crossAxisAlignment = CrossAxisAlignment.center,
|
||||
}) : _isList = false,
|
||||
super(key: key);
|
||||
}) : _isList = false;
|
||||
|
||||
/// The error message to display.
|
||||
final Widget? error;
|
||||
@@ -86,7 +84,7 @@ class StreamScrollViewLoadMoreError extends StatelessWidget {
|
||||
|
||||
return InkWell(
|
||||
onTap: onTap,
|
||||
child: Container(
|
||||
child: ColoredBox(
|
||||
color: backgroundColor,
|
||||
child: Padding(
|
||||
padding: padding,
|
||||
|
||||
+2
-2
@@ -5,10 +5,10 @@ import 'package:flutter/material.dart';
|
||||
class StreamScrollViewLoadMoreIndicator extends StatelessWidget {
|
||||
/// Creates a new instance of [StreamScrollViewLoadMoreIndicator].
|
||||
const StreamScrollViewLoadMoreIndicator({
|
||||
Key? key,
|
||||
super.key,
|
||||
this.height = 16,
|
||||
this.width = 16,
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
/// The height of the indicator.
|
||||
final double height;
|
||||
|
||||
+2
-2
@@ -4,10 +4,10 @@ import 'package:flutter/material.dart';
|
||||
class StreamScrollViewLoadingWidget extends StatelessWidget {
|
||||
/// Creates a new instance of [StreamScrollViewLoadingWidget].
|
||||
const StreamScrollViewLoadingWidget({
|
||||
Key? key,
|
||||
super.key,
|
||||
this.height = 42,
|
||||
this.width = 42,
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
/// The height of the indicator.
|
||||
final double height;
|
||||
|
||||
+2
-2
@@ -13,13 +13,13 @@ import 'package:stream_chat_flutter/stream_chat_flutter.dart';
|
||||
class StreamUserGridTile extends StatelessWidget {
|
||||
/// Creates a new instance of [StreamUserGridTile] widget.
|
||||
const StreamUserGridTile({
|
||||
Key? key,
|
||||
super.key,
|
||||
required this.user,
|
||||
this.child,
|
||||
this.footer,
|
||||
this.onTap,
|
||||
this.onLongPress,
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
/// The user to display.
|
||||
final User user;
|
||||
|
||||
+2
-2
@@ -39,7 +39,7 @@ typedef StreamUserGridViewIndexedWidgetBuilder
|
||||
class StreamUserGridView extends StatelessWidget {
|
||||
/// Creates a new instance of [StreamUserGridView].
|
||||
const StreamUserGridView({
|
||||
Key? key,
|
||||
super.key,
|
||||
required this.controller,
|
||||
this.gridDelegate = defaultUserGridViewDelegate,
|
||||
this.itemBuilder,
|
||||
@@ -67,7 +67,7 @@ class StreamUserGridView extends StatelessWidget {
|
||||
this.keyboardDismissBehavior = ScrollViewKeyboardDismissBehavior.manual,
|
||||
this.restorationId,
|
||||
this.clipBehavior = Clip.hardEdge,
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
/// The [StreamUserListController] used to control the grid of users.
|
||||
final StreamUserListController controller;
|
||||
|
||||
+4
-4
@@ -19,7 +19,7 @@ import 'package:stream_chat_flutter_core/stream_chat_flutter_core.dart'
|
||||
class StreamUserListTile extends StatelessWidget {
|
||||
/// Creates a new instance of [StreamUserListTile].
|
||||
const StreamUserListTile({
|
||||
Key? key,
|
||||
super.key,
|
||||
required this.user,
|
||||
this.leading,
|
||||
this.title,
|
||||
@@ -31,7 +31,7 @@ class StreamUserListTile extends StatelessWidget {
|
||||
this.tileColor,
|
||||
this.visualDensity = VisualDensity.compact,
|
||||
this.contentPadding = const EdgeInsets.symmetric(horizontal: 8),
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
/// The user to display.
|
||||
final User user;
|
||||
@@ -171,9 +171,9 @@ class StreamUserListTile extends StatelessWidget {
|
||||
class UserLastActive extends StatelessWidget {
|
||||
/// Creates a new instance of the [UserLastActive] widget.
|
||||
const UserLastActive({
|
||||
Key? key,
|
||||
super.key,
|
||||
required this.user,
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
/// The user whose last active time is displayed.
|
||||
final User user;
|
||||
|
||||
+3
-3
@@ -48,7 +48,7 @@ typedef StreamUserListViewIndexedWidgetBuilder
|
||||
class StreamUserListView extends StatelessWidget {
|
||||
/// Creates a new instance of [StreamUserListView].
|
||||
const StreamUserListView({
|
||||
Key? key,
|
||||
super.key,
|
||||
required this.controller,
|
||||
this.itemBuilder,
|
||||
this.separatorBuilder = defaultUserListViewSeparatorBuilder,
|
||||
@@ -73,7 +73,7 @@ class StreamUserListView extends StatelessWidget {
|
||||
this.keyboardDismissBehavior = ScrollViewKeyboardDismissBehavior.manual,
|
||||
this.restorationId,
|
||||
this.clipBehavior = Clip.hardEdge,
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
/// The [StreamUserListController] used to control the list of users.
|
||||
final StreamUserListController controller;
|
||||
@@ -368,7 +368,7 @@ class StreamUserListView extends StatelessWidget {
|
||||
/// [StreamUserListTile] items.
|
||||
class StreamUserListSeparator extends StatelessWidget {
|
||||
/// Creates a new instance of [StreamUserListSeparator].
|
||||
const StreamUserListSeparator({Key? key}) : super(key: key);
|
||||
const StreamUserListSeparator({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
@@ -47,7 +47,7 @@ import 'package:stream_chat_flutter/stream_chat_flutter.dart';
|
||||
class StreamChannelAvatar extends StatelessWidget {
|
||||
/// Instantiate a new ChannelImage
|
||||
StreamChannelAvatar({
|
||||
Key? key,
|
||||
super.key,
|
||||
required this.channel,
|
||||
this.constraints,
|
||||
this.onTap,
|
||||
@@ -55,11 +55,10 @@ class StreamChannelAvatar extends StatelessWidget {
|
||||
this.selected = false,
|
||||
this.selectionColor,
|
||||
this.selectionThickness = 4,
|
||||
}) : assert(
|
||||
}) : assert(
|
||||
channel.state != null,
|
||||
'Channel ${channel.id} is not initialized',
|
||||
),
|
||||
super(key: key);
|
||||
);
|
||||
|
||||
/// [BorderRadius] to display the widget
|
||||
final BorderRadius? borderRadius;
|
||||
|
||||
@@ -13,18 +13,17 @@ import 'package:stream_chat_flutter_core/stream_chat_flutter_core.dart';
|
||||
class StreamChannelInfoBottomSheet extends StatelessWidget {
|
||||
/// Creates a new instance [StreamChannelInfoBottomSheet] widget.
|
||||
StreamChannelInfoBottomSheet({
|
||||
Key? key,
|
||||
super.key,
|
||||
required this.channel,
|
||||
this.onMemberTap,
|
||||
this.onViewInfoTap,
|
||||
this.onLeaveChannelTap,
|
||||
this.onDeleteConversationTap,
|
||||
this.onCancelTap,
|
||||
}) : assert(
|
||||
}) : assert(
|
||||
channel.state != null,
|
||||
'Channel ${channel.id} is not initialized',
|
||||
),
|
||||
super(key: key);
|
||||
);
|
||||
|
||||
/// The [Channel] to show information about.
|
||||
final Channel channel;
|
||||
|
||||
@@ -10,15 +10,14 @@ import 'package:stream_chat_flutter_core/stream_chat_flutter_core.dart';
|
||||
class StreamChannelName extends StatelessWidget {
|
||||
/// Instantiate a new ChannelName
|
||||
StreamChannelName({
|
||||
Key? key,
|
||||
super.key,
|
||||
required this.channel,
|
||||
this.textStyle,
|
||||
this.textOverflow = TextOverflow.ellipsis,
|
||||
}) : assert(
|
||||
}) : assert(
|
||||
channel.state != null,
|
||||
'Channel ${channel.id} is not initialized',
|
||||
),
|
||||
super(key: key);
|
||||
);
|
||||
|
||||
/// The [Channel] to show the name for.
|
||||
final Channel channel;
|
||||
|
||||
@@ -6,11 +6,11 @@ import 'package:stream_chat_flutter/stream_chat_flutter.dart';
|
||||
class StreamMessagePreviewText extends StatelessWidget {
|
||||
/// Creates a new instance of [StreamMessagePreviewText].
|
||||
const StreamMessagePreviewText({
|
||||
Key? key,
|
||||
super.key,
|
||||
required this.message,
|
||||
this.language,
|
||||
this.textStyle,
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
/// The message to display.
|
||||
final Message message;
|
||||
|
||||
Reference in New Issue
Block a user