This commit is contained in:
Salvatore Giordano
2020-04-09 18:01:44 +02:00
parent d6033ec2b6
commit 88ec33d798
16 changed files with 31 additions and 9 deletions
+1 -1
View File
@@ -44,7 +44,7 @@ linter:
- package_prefixed_library_names
- prefer_is_not_empty
# - prefer_mixin # https://github.com/dart-lang/language/issues/32
# - public_member_api_docs
- public_member_api_docs
- slash_for_doc_comments
# - sort_constructors_first
# - sort_unnamed_constructors_first
+1 -1
View File
@@ -23,7 +23,7 @@ Future<void> _handleAndroidNotification(
body: notificationData.message.text,
);
await NotificationService.sendNotification(androidNotificationOptions);
await NotificationService.showNotification(androidNotificationOptions);
}
void main() async {
+1
View File
@@ -43,6 +43,7 @@ import 'package:stream_chat_flutter/stream_chat_flutter.dart';
/// The widget renders the ui based on the first ancestor of type [StreamChatTheme].
/// Modify it to change the widget appearance.
class ChannelImage extends StatelessWidget {
/// Instantiate a new ChannelImage
const ChannelImage({
Key key,
this.channel,
+2
View File
@@ -47,6 +47,7 @@ typedef ChannelPreviewBuilder = Widget Function(BuildContext, Channel);
/// The widget components render the ui based on the first ancestor of type [StreamChatTheme].
/// Modify it to change the widget appearance.
class ChannelListView extends StatefulWidget {
/// Instantiate a new ChannelListView
ChannelListView({
Key key,
this.filter,
@@ -59,6 +60,7 @@ class ChannelListView extends StatefulWidget {
this.errorBuilder,
}) : super(key: key);
/// The builder that will be used in case of error
final Widget Function(Error error) errorBuilder;
/// The query filters to use.
+1
View File
@@ -7,6 +7,7 @@ import 'stream_channel.dart';
///
/// The widget uses a [StreamBuilder] to render the channel information image as soon as it updates.
class ChannelName extends StatelessWidget {
/// Instantiate a new ChannelName
const ChannelName({
Key key,
this.channel,
+1
View File
@@ -25,6 +25,7 @@ class ChannelPreview extends StatelessWidget {
/// Channel displayed
final Channel channel;
/// Instantiate a new ChannelPreview
ChannelPreview({
@required this.channel,
Key key,
+5
View File
@@ -5,9 +5,12 @@ import 'package:rxdart/rxdart.dart';
import 'package:stream_chat/stream_chat.dart';
import 'package:stream_chat_flutter/src/stream_chat.dart';
/// Widget dedicated to the management of a channel list with pagination
class ChannelsBloc extends StatefulWidget {
/// The widget child
final Widget child;
/// Instantiate a new ChannelsBloc
const ChannelsBloc({
Key key,
this.child,
@@ -16,6 +19,7 @@ class ChannelsBloc extends StatefulWidget {
@override
ChannelsBlocState createState() => ChannelsBlocState();
/// Use this method to get the current [ChannelsBlocState] instance
static ChannelsBlocState of(BuildContext context) {
ChannelsBlocState streamChatState;
@@ -29,6 +33,7 @@ class ChannelsBloc extends StatefulWidget {
}
}
/// The current state of the [ChannelsBloc]
class ChannelsBlocState extends State<ChannelsBloc>
with AutomaticKeepAliveClientMixin {
@override
+3
View File
@@ -2,9 +2,12 @@ import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart';
import 'package:photo_view/photo_view.dart';
/// A full screen image widget
class FullScreenImage extends StatelessWidget {
/// The url of the image
final String url;
/// Instantiate a new FullScreenImage
const FullScreenImage({
Key key,
@required this.url,
+8 -7
View File
@@ -56,13 +56,14 @@ import 'stream_channel.dart';
/// The widget renders the ui based on the first ancestor of type [StreamChatTheme].
/// Modify it to change the widget appearance.
class MessageInput extends StatefulWidget {
MessageInput(
{Key key,
this.onMessageSent,
this.parentMessage,
this.editMessage,
this.maxHeight = 150})
: super(key: key);
/// Instantiate a new MessageInput
MessageInput({
Key key,
this.onMessageSent,
this.parentMessage,
this.editMessage,
this.maxHeight = 150,
}) : super(key: key);
/// Message to edit
final Message editMessage;
+1
View File
@@ -55,6 +55,7 @@ typedef ThreadTapCallback = void Function(Message, Widget);
/// The widget components render the ui based on the first ancestor of type [StreamChatTheme].
/// Modify it to change the widget appearance.
class MessageListView extends StatefulWidget {
/// Instantiate a new MessageListView
MessageListView({
Key key,
this.messageBuilder,
+1
View File
@@ -32,6 +32,7 @@ import 'stream_chat.dart';
/// The widget components render the ui based on the first ancestor of type [StreamChatTheme].
/// Modify it to change the widget appearance.
class MessageWidget extends StatefulWidget {
/// Instantiate a new MessageWidget
const MessageWidget({
Key key,
@required this.previousMessage,
+2
View File
@@ -67,11 +67,13 @@ class ReactionPicker extends StatelessWidget {
);
}
/// Add a reaction to the message
void sendReaction(BuildContext context, String reactionType) {
channel.sendReaction(message.id, reactionType);
Navigator.of(context).pop();
}
/// Remove a reaction from the message
void removeReaction(BuildContext context, String reactionType) {
channel.deleteReaction(message.id, reactionType);
Navigator.of(context).pop();
+1
View File
@@ -101,6 +101,7 @@ class StreamChannelState extends State<StreamChannel> {
});
}
/// Query the channel members and watchers
Future<void> queryMembersAndWatchers() async {
await widget.channel.query(
membersPagination: PaginationParams(
+1
View File
@@ -59,6 +59,7 @@ class StreamChat extends StatefulWidget {
}
}
/// The current state of the StreamChat widget
class StreamChatState extends State<StreamChat> with WidgetsBindingObserver {
Client get client => widget.client;
final GlobalKey<NavigatorState> _navigatorKey = GlobalKey<NavigatorState>();
+1
View File
@@ -62,6 +62,7 @@ class ThreadHeader extends StatelessWidget implements PreferredSizeWidget {
/// The message parent of this thread
final Message parent;
/// Instantiate a new ThreadHeader
ThreadHeader({
Key key,
@required this.parent,
+1
View File
@@ -4,6 +4,7 @@ import 'package:stream_chat_flutter/src/stream_channel.dart';
/// Widget to show the current list of typing users
class TypingIndicator extends StatelessWidget {
/// Instantiate a new TypingIndicator
const TypingIndicator({
Key key,
this.channel,