rfac: Changed names according to convention
This commit is contained in:
+6
-6
@@ -41,9 +41,9 @@ import 'stream_chat_core.dart';
|
|||||||
///
|
///
|
||||||
/// The widget components render the ui based on the first ancestor of type [StreamChatTheme].
|
/// The widget components render the ui based on the first ancestor of type [StreamChatTheme].
|
||||||
/// Modify it to change the widget appearance.
|
/// Modify it to change the widget appearance.
|
||||||
class ChannelListViewCore extends StatefulWidget {
|
class ChannelListCore extends StatefulWidget {
|
||||||
/// Instantiate a new ChannelListView
|
/// Instantiate a new ChannelListView
|
||||||
ChannelListViewCore({
|
ChannelListCore({
|
||||||
Key key,
|
Key key,
|
||||||
this.filter,
|
this.filter,
|
||||||
this.options,
|
this.options,
|
||||||
@@ -96,10 +96,10 @@ class ChannelListViewCore extends StatefulWidget {
|
|||||||
final bool pullToRefresh;
|
final bool pullToRefresh;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_ChannelListViewCoreState createState() => _ChannelListViewCoreState();
|
_ChannelListCoreState createState() => _ChannelListCoreState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _ChannelListViewCoreState extends State<ChannelListViewCore>
|
class _ChannelListCoreState extends State<ChannelListCore>
|
||||||
with WidgetsBindingObserver {
|
with WidgetsBindingObserver {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
@@ -233,7 +233,7 @@ class _ChannelListViewCoreState extends State<ChannelListViewCore>
|
|||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void didUpdateWidget(ChannelListViewCore oldWidget) {
|
void didUpdateWidget(ChannelListCore oldWidget) {
|
||||||
super.didUpdateWidget(oldWidget);
|
super.didUpdateWidget(oldWidget);
|
||||||
|
|
||||||
if (widget.filter?.toString() != oldWidget.filter?.toString() ||
|
if (widget.filter?.toString() != oldWidget.filter?.toString() ||
|
||||||
@@ -259,7 +259,7 @@ class _ChannelListViewCoreState extends State<ChannelListViewCore>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Controller used for paginating data in [ChannelListViewCore]
|
/// Controller used for paginating data in [ChannelListCore]
|
||||||
class ChannelListController {
|
class ChannelListController {
|
||||||
VoidCallback loadData;
|
VoidCallback loadData;
|
||||||
VoidCallback paginateData;
|
VoidCallback paginateData;
|
||||||
+4
-4
@@ -45,9 +45,9 @@ import 'stream_channel.dart';
|
|||||||
///
|
///
|
||||||
/// The widget components render the ui based on the first ancestor of type [StreamChatTheme].
|
/// The widget components render the ui based on the first ancestor of type [StreamChatTheme].
|
||||||
/// Modify it to change the widget appearance.
|
/// Modify it to change the widget appearance.
|
||||||
class MessageListViewCore extends StatefulWidget {
|
class MessageListCore extends StatefulWidget {
|
||||||
/// Instantiate a new MessageListView
|
/// Instantiate a new MessageListView
|
||||||
MessageListViewCore({
|
MessageListCore({
|
||||||
Key key,
|
Key key,
|
||||||
this.showScrollToBottom = true,
|
this.showScrollToBottom = true,
|
||||||
this.parentMessage,
|
this.parentMessage,
|
||||||
@@ -78,10 +78,10 @@ class MessageListViewCore extends StatefulWidget {
|
|||||||
final Widget Function(DateTime) dateDividerBuilder;
|
final Widget Function(DateTime) dateDividerBuilder;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_MessageListViewCoreState createState() => _MessageListViewCoreState();
|
_MessageListCoreState createState() => _MessageListCoreState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _MessageListViewCoreState extends State<MessageListViewCore> {
|
class _MessageListCoreState extends State<MessageListCore> {
|
||||||
StreamChannelState streamChannel;
|
StreamChannelState streamChannel;
|
||||||
|
|
||||||
bool get _upToDate => streamChannel.channel.state.isUpToDate;
|
bool get _upToDate => streamChannel.channel.state.isUpToDate;
|
||||||
+7
-19
@@ -4,17 +4,6 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:stream_chat/stream_chat.dart';
|
import 'package:stream_chat/stream_chat.dart';
|
||||||
import 'message_search_bloc.dart';
|
import 'message_search_bloc.dart';
|
||||||
|
|
||||||
/// Callback called when tapping on a user
|
|
||||||
typedef MessageSearchItemTapCallback = void Function(GetMessageResponse);
|
|
||||||
|
|
||||||
/// Builder used to create a custom [ListUserItem] from a [User]
|
|
||||||
typedef MessageSearchItemBuilder = Widget Function(
|
|
||||||
BuildContext, GetMessageResponse);
|
|
||||||
|
|
||||||
/// Builder used when [MessageSearchListViewCore] is empty
|
|
||||||
typedef EmptyMessageSearchBuilder = Widget Function(
|
|
||||||
BuildContext context, String searchQuery);
|
|
||||||
|
|
||||||
///
|
///
|
||||||
/// It shows the list of searched messages.
|
/// It shows the list of searched messages.
|
||||||
///
|
///
|
||||||
@@ -43,9 +32,9 @@ typedef EmptyMessageSearchBuilder = Widget Function(
|
|||||||
///
|
///
|
||||||
/// The widget components render the ui based on the first ancestor of type [StreamChatTheme].
|
/// The widget components render the ui based on the first ancestor of type [StreamChatTheme].
|
||||||
/// Modify it to change the widget appearance.
|
/// Modify it to change the widget appearance.
|
||||||
class MessageSearchListViewCore extends StatefulWidget {
|
class MessageSearchListCore extends StatefulWidget {
|
||||||
/// Instantiate a new MessageSearchListView
|
/// Instantiate a new MessageSearchListView
|
||||||
const MessageSearchListViewCore({
|
const MessageSearchListCore({
|
||||||
Key key,
|
Key key,
|
||||||
this.messageQuery,
|
this.messageQuery,
|
||||||
this.filters,
|
this.filters,
|
||||||
@@ -89,7 +78,7 @@ class MessageSearchListViewCore extends StatefulWidget {
|
|||||||
final Widget Function(List<GetMessageResponse>) childBuilder;
|
final Widget Function(List<GetMessageResponse>) childBuilder;
|
||||||
|
|
||||||
/// The builder used when the channel list is empty.
|
/// The builder used when the channel list is empty.
|
||||||
final EmptyMessageSearchBuilder emptyBuilder;
|
final WidgetBuilder emptyBuilder;
|
||||||
|
|
||||||
/// The builder that will be used in case of error
|
/// The builder that will be used in case of error
|
||||||
final Widget Function(Error error) errorBuilder;
|
final Widget Function(Error error) errorBuilder;
|
||||||
@@ -97,11 +86,10 @@ class MessageSearchListViewCore extends StatefulWidget {
|
|||||||
final WidgetBuilder loadingBuilder;
|
final WidgetBuilder loadingBuilder;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_MessageSearchListViewCoreState createState() =>
|
_MessageSearchListCoreState createState() => _MessageSearchListCoreState();
|
||||||
_MessageSearchListViewCoreState();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class _MessageSearchListViewCoreState extends State<MessageSearchListViewCore> {
|
class _MessageSearchListCoreState extends State<MessageSearchListCore> {
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
@@ -145,7 +133,7 @@ class _MessageSearchListViewCoreState extends State<MessageSearchListViewCore> {
|
|||||||
final items = snapshot.data;
|
final items = snapshot.data;
|
||||||
|
|
||||||
if (items.isEmpty) {
|
if (items.isEmpty) {
|
||||||
return widget.emptyBuilder(context, widget.messageQuery);
|
return widget.emptyBuilder(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
return widget.childBuilder(snapshot.data);
|
return widget.childBuilder(snapshot.data);
|
||||||
@@ -180,7 +168,7 @@ class _MessageSearchListViewCoreState extends State<MessageSearchListViewCore> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void didUpdateWidget(MessageSearchListViewCore oldWidget) {
|
void didUpdateWidget(MessageSearchListCore oldWidget) {
|
||||||
super.didUpdateWidget(oldWidget);
|
super.didUpdateWidget(oldWidget);
|
||||||
if (widget.filters?.toString() != oldWidget.filters?.toString() ||
|
if (widget.filters?.toString() != oldWidget.filters?.toString() ||
|
||||||
jsonEncode(widget.sortOptions) != jsonEncode(oldWidget.sortOptions) ||
|
jsonEncode(widget.sortOptions) != jsonEncode(oldWidget.sortOptions) ||
|
||||||
+5
-5
@@ -35,9 +35,9 @@ import 'package:stream_chat_flutter_core/src/users_bloc.dart';
|
|||||||
///
|
///
|
||||||
/// The widget components render the ui based on the first ancestor of type [StreamChatTheme].
|
/// The widget components render the ui based on the first ancestor of type [StreamChatTheme].
|
||||||
/// Modify it to change the widget appearance.
|
/// Modify it to change the widget appearance.
|
||||||
class UserListViewCore extends StatefulWidget {
|
class UserListCore extends StatefulWidget {
|
||||||
/// Instantiate a new UserListView
|
/// Instantiate a new UserListView
|
||||||
const UserListViewCore({
|
const UserListCore({
|
||||||
Key key,
|
Key key,
|
||||||
this.filter,
|
this.filter,
|
||||||
this.options,
|
this.options,
|
||||||
@@ -98,10 +98,10 @@ class UserListViewCore extends StatefulWidget {
|
|||||||
final bool groupAlphabetically;
|
final bool groupAlphabetically;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_UserListViewCoreState createState() => _UserListViewCoreState();
|
_UserListCoreState createState() => _UserListCoreState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _UserListViewCoreState extends State<UserListViewCore>
|
class _UserListCoreState extends State<UserListCore>
|
||||||
with WidgetsBindingObserver {
|
with WidgetsBindingObserver {
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
@@ -229,7 +229,7 @@ class _UserListViewCoreState extends State<UserListViewCore>
|
|||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void didUpdateWidget(UserListViewCore oldWidget) {
|
void didUpdateWidget(UserListCore oldWidget) {
|
||||||
super.didUpdateWidget(oldWidget);
|
super.didUpdateWidget(oldWidget);
|
||||||
if (widget.filter?.toString() != oldWidget.filter?.toString() ||
|
if (widget.filter?.toString() != oldWidget.filter?.toString() ||
|
||||||
jsonEncode(widget.sort) != jsonEncode(oldWidget.sort) ||
|
jsonEncode(widget.sort) != jsonEncode(oldWidget.sort) ||
|
||||||
@@ -1,12 +1,12 @@
|
|||||||
library stream_chat_flutter_core;
|
library stream_chat_flutter_core;
|
||||||
|
|
||||||
export 'src/channel_list_view_core.dart';
|
export 'src/channel_list_core.dart';
|
||||||
export 'src/channels_bloc.dart';
|
export 'src/channels_bloc.dart';
|
||||||
export 'src/lazy_load_scroll_view.dart';
|
export 'src/lazy_load_scroll_view.dart';
|
||||||
export 'src/message_list_view_core.dart';
|
export 'src/message_list_core.dart';
|
||||||
export 'src/message_search_bloc.dart';
|
export 'src/message_search_bloc.dart';
|
||||||
export 'src/message_search_list_view_core.dart';
|
export 'src/message_search_list_core.dart';
|
||||||
export 'src/stream_channel.dart';
|
export 'src/stream_channel.dart';
|
||||||
export 'src/stream_chat_core.dart';
|
export 'src/stream_chat_core.dart';
|
||||||
export 'src/user_list_view_core.dart';
|
export 'src/user_list_core.dart';
|
||||||
export 'src/users_bloc.dart';
|
export 'src/users_bloc.dart';
|
||||||
|
|||||||
Reference in New Issue
Block a user