fix format

This commit is contained in:
Salvatore Giordano
2022-05-16 14:54:59 +02:00
parent 2f9a35f3fa
commit f969b4a51d
13 changed files with 16 additions and 17 deletions
@@ -43,7 +43,7 @@ abstract class StreamAttachmentWidget extends StatelessWidget {
required this.attachment, required this.attachment,
this.size, this.size,
AttachmentSource? source, AttachmentSource? source,
}) : _source = source; }) : _source = source;
/// Size of attachments /// Size of attachments
final Size? size; final Size? size;
@@ -74,7 +74,7 @@ class StreamChannelHeader extends StatelessWidget
this.actions, this.actions,
this.backgroundColor, this.backgroundColor,
this.elevation = 1, this.elevation = 1,
}) : preferredSize = const Size.fromHeight(kToolbarHeight); }) : preferredSize = const Size.fromHeight(kToolbarHeight);
/// True if this header shows the leading back button /// True if this header shows the leading back button
final bool showBackButton; final bool showBackButton;
@@ -38,7 +38,7 @@ class StreamFullScreenMedia extends StatefulWidget {
this.onShowMessage, this.onShowMessage,
this.attachmentActionsModalBuilder, this.attachmentActionsModalBuilder,
this.autoplayVideos = false, this.autoplayVideos = false,
}) : userName = userName ?? ''; }) : userName = userName ?? '';
/// The url of the image /// The url of the image
final List<StreamAttachmentPackage> mediaAttachmentPackages; final List<StreamAttachmentPackage> mediaAttachmentPackages;
@@ -29,7 +29,7 @@ class StreamGalleryFooter extends StatefulWidget
required this.mediaAttachmentPackages, required this.mediaAttachmentPackages,
this.mediaSelectedCallBack, this.mediaSelectedCallBack,
this.backgroundColor, this.backgroundColor,
}) : preferredSize = const Size.fromHeight(kToolbarHeight); }) : preferredSize = const Size.fromHeight(kToolbarHeight);
/// Callback to call when pressing the back button. /// Callback to call when pressing the back button.
/// By default it calls [Navigator.pop] /// By default it calls [Navigator.pop]
@@ -38,7 +38,7 @@ class StreamGalleryHeader extends StatelessWidget
this.sentAt = '', this.sentAt = '',
this.backgroundColor, this.backgroundColor,
this.attachmentActionsModalBuilder, this.attachmentActionsModalBuilder,
}) : preferredSize = const Size.fromHeight(kToolbarHeight); }) : preferredSize = const Size.fromHeight(kToolbarHeight);
/// True if this header shows the leading back button /// True if this header shows the leading back button
final bool showBackButton; final bool showBackButton;
@@ -79,7 +79,7 @@ class StreamThreadHeader extends StatelessWidget
this.showTypingIndicator = true, this.showTypingIndicator = true,
this.backgroundColor, this.backgroundColor,
this.elevation = 1, this.elevation = 1,
}) : preferredSize = const Size.fromHeight(kToolbarHeight); }) : preferredSize = const Size.fromHeight(kToolbarHeight);
/// True if this header shows the leading back button /// True if this header shows the leading back button
final bool showBackButton; final bool showBackButton;
@@ -30,7 +30,7 @@ class StreamChannelListTile extends StatelessWidget {
this.contentPadding = const EdgeInsets.symmetric(horizontal: 8), this.contentPadding = const EdgeInsets.symmetric(horizontal: 8),
this.unreadIndicatorBuilder, this.unreadIndicatorBuilder,
this.sendingIndicatorBuilder, this.sendingIndicatorBuilder,
}) : assert( }) : assert(
channel.state != null, channel.state != null,
'Channel ${channel.id} is not initialized', 'Channel ${channel.id} is not initialized',
); );
@@ -230,7 +230,7 @@ class ChannelLastMessageDate extends StatelessWidget {
super.key, super.key,
required this.channel, required this.channel,
this.textStyle, this.textStyle,
}) : assert( }) : assert(
channel.state != null, channel.state != null,
'Channel ${channel.id} is not initialized', 'Channel ${channel.id} is not initialized',
); );
@@ -282,7 +282,7 @@ class ChannelListTileSubtitle extends StatelessWidget {
super.key, super.key,
required this.channel, required this.channel,
this.textStyle, this.textStyle,
}) : assert( }) : assert(
channel.state != null, channel.state != null,
'Channel ${channel.id} is not initialized', 'Channel ${channel.id} is not initialized',
); );
@@ -325,7 +325,7 @@ class ChannelLastMessageText extends StatelessWidget {
super.key, super.key,
required this.channel, required this.channel,
this.textStyle, this.textStyle,
}) : assert( }) : assert(
channel.state != null, channel.state != null,
'Channel ${channel.id} is not initialized', 'Channel ${channel.id} is not initialized',
); );
@@ -17,7 +17,7 @@ class StreamScrollViewLoadMoreError extends StatelessWidget {
this.mainAxisSize = MainAxisSize.max, this.mainAxisSize = MainAxisSize.max,
this.mainAxisAlignment = MainAxisAlignment.spaceBetween, this.mainAxisAlignment = MainAxisAlignment.spaceBetween,
this.crossAxisAlignment = CrossAxisAlignment.center, this.crossAxisAlignment = CrossAxisAlignment.center,
}) : _isList = true; }) : _isList = true;
/// Creates a new instance of [StreamScrollViewLoadMoreError.grid]. /// Creates a new instance of [StreamScrollViewLoadMoreError.grid].
const StreamScrollViewLoadMoreError.grid({ const StreamScrollViewLoadMoreError.grid({
@@ -31,7 +31,7 @@ class StreamScrollViewLoadMoreError extends StatelessWidget {
this.mainAxisSize = MainAxisSize.max, this.mainAxisSize = MainAxisSize.max,
this.mainAxisAlignment = MainAxisAlignment.spaceEvenly, this.mainAxisAlignment = MainAxisAlignment.spaceEvenly,
this.crossAxisAlignment = CrossAxisAlignment.center, this.crossAxisAlignment = CrossAxisAlignment.center,
}) : _isList = false; }) : _isList = false;
/// The error message to display. /// The error message to display.
final Widget? error; final Widget? error;
@@ -55,7 +55,7 @@ class StreamChannelAvatar extends StatelessWidget {
this.selected = false, this.selected = false,
this.selectionColor, this.selectionColor,
this.selectionThickness = 4, this.selectionThickness = 4,
}) : assert( }) : assert(
channel.state != null, channel.state != null,
'Channel ${channel.id} is not initialized', 'Channel ${channel.id} is not initialized',
); );
@@ -20,7 +20,7 @@ class StreamChannelInfoBottomSheet extends StatelessWidget {
this.onLeaveChannelTap, this.onLeaveChannelTap,
this.onDeleteConversationTap, this.onDeleteConversationTap,
this.onCancelTap, this.onCancelTap,
}) : assert( }) : assert(
channel.state != null, channel.state != null,
'Channel ${channel.id} is not initialized', 'Channel ${channel.id} is not initialized',
); );
@@ -14,7 +14,7 @@ class StreamChannelName extends StatelessWidget {
required this.channel, required this.channel,
this.textStyle, this.textStyle,
this.textOverflow = TextOverflow.ellipsis, this.textOverflow = TextOverflow.ellipsis,
}) : assert( }) : assert(
channel.state != null, channel.state != null,
'Channel ${channel.id} is not initialized', 'Channel ${channel.id} is not initialized',
); );
@@ -28,5 +28,4 @@ class CustomGoldenFileComparator extends LocalFileComparator {
} }
return true; return true;
} }
} }
@@ -64,7 +64,7 @@ class StreamChannelListController extends PagedValueNotifier<int, Channel> {
this.limit = defaultChannelPagedLimit, this.limit = defaultChannelPagedLimit,
this.messageLimit, this.messageLimit,
this.memberLimit, this.memberLimit,
}) : _eventHandler = eventHandler ?? StreamChannelListEventHandler(); }) : _eventHandler = eventHandler ?? StreamChannelListEventHandler();
/// The client to use for the channels list. /// The client to use for the channels list.
final StreamChatClient client; final StreamChatClient client;