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].
|
||||
/// Modify it to change the widget appearance.
|
||||
class ChannelListViewCore extends StatefulWidget {
|
||||
class ChannelListCore extends StatefulWidget {
|
||||
/// Instantiate a new ChannelListView
|
||||
ChannelListViewCore({
|
||||
ChannelListCore({
|
||||
Key key,
|
||||
this.filter,
|
||||
this.options,
|
||||
@@ -96,10 +96,10 @@ class ChannelListViewCore extends StatefulWidget {
|
||||
final bool pullToRefresh;
|
||||
|
||||
@override
|
||||
_ChannelListViewCoreState createState() => _ChannelListViewCoreState();
|
||||
_ChannelListCoreState createState() => _ChannelListCoreState();
|
||||
}
|
||||
|
||||
class _ChannelListViewCoreState extends State<ChannelListViewCore>
|
||||
class _ChannelListCoreState extends State<ChannelListCore>
|
||||
with WidgetsBindingObserver {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -233,7 +233,7 @@ class _ChannelListViewCoreState extends State<ChannelListViewCore>
|
||||
}
|
||||
|
||||
@override
|
||||
void didUpdateWidget(ChannelListViewCore oldWidget) {
|
||||
void didUpdateWidget(ChannelListCore oldWidget) {
|
||||
super.didUpdateWidget(oldWidget);
|
||||
|
||||
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 {
|
||||
VoidCallback loadData;
|
||||
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].
|
||||
/// Modify it to change the widget appearance.
|
||||
class MessageListViewCore extends StatefulWidget {
|
||||
class MessageListCore extends StatefulWidget {
|
||||
/// Instantiate a new MessageListView
|
||||
MessageListViewCore({
|
||||
MessageListCore({
|
||||
Key key,
|
||||
this.showScrollToBottom = true,
|
||||
this.parentMessage,
|
||||
@@ -78,10 +78,10 @@ class MessageListViewCore extends StatefulWidget {
|
||||
final Widget Function(DateTime) dateDividerBuilder;
|
||||
|
||||
@override
|
||||
_MessageListViewCoreState createState() => _MessageListViewCoreState();
|
||||
_MessageListCoreState createState() => _MessageListCoreState();
|
||||
}
|
||||
|
||||
class _MessageListViewCoreState extends State<MessageListViewCore> {
|
||||
class _MessageListCoreState extends State<MessageListCore> {
|
||||
StreamChannelState streamChannel;
|
||||
|
||||
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 '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.
|
||||
///
|
||||
@@ -43,9 +32,9 @@ typedef EmptyMessageSearchBuilder = Widget Function(
|
||||
///
|
||||
/// The widget components render the ui based on the first ancestor of type [StreamChatTheme].
|
||||
/// Modify it to change the widget appearance.
|
||||
class MessageSearchListViewCore extends StatefulWidget {
|
||||
class MessageSearchListCore extends StatefulWidget {
|
||||
/// Instantiate a new MessageSearchListView
|
||||
const MessageSearchListViewCore({
|
||||
const MessageSearchListCore({
|
||||
Key key,
|
||||
this.messageQuery,
|
||||
this.filters,
|
||||
@@ -89,7 +78,7 @@ class MessageSearchListViewCore extends StatefulWidget {
|
||||
final Widget Function(List<GetMessageResponse>) childBuilder;
|
||||
|
||||
/// 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
|
||||
final Widget Function(Error error) errorBuilder;
|
||||
@@ -97,11 +86,10 @@ class MessageSearchListViewCore extends StatefulWidget {
|
||||
final WidgetBuilder loadingBuilder;
|
||||
|
||||
@override
|
||||
_MessageSearchListViewCoreState createState() =>
|
||||
_MessageSearchListViewCoreState();
|
||||
_MessageSearchListCoreState createState() => _MessageSearchListCoreState();
|
||||
}
|
||||
|
||||
class _MessageSearchListViewCoreState extends State<MessageSearchListViewCore> {
|
||||
class _MessageSearchListCoreState extends State<MessageSearchListCore> {
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
@@ -145,7 +133,7 @@ class _MessageSearchListViewCoreState extends State<MessageSearchListViewCore> {
|
||||
final items = snapshot.data;
|
||||
|
||||
if (items.isEmpty) {
|
||||
return widget.emptyBuilder(context, widget.messageQuery);
|
||||
return widget.emptyBuilder(context);
|
||||
}
|
||||
|
||||
return widget.childBuilder(snapshot.data);
|
||||
@@ -180,7 +168,7 @@ class _MessageSearchListViewCoreState extends State<MessageSearchListViewCore> {
|
||||
}
|
||||
|
||||
@override
|
||||
void didUpdateWidget(MessageSearchListViewCore oldWidget) {
|
||||
void didUpdateWidget(MessageSearchListCore oldWidget) {
|
||||
super.didUpdateWidget(oldWidget);
|
||||
if (widget.filters?.toString() != oldWidget.filters?.toString() ||
|
||||
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].
|
||||
/// Modify it to change the widget appearance.
|
||||
class UserListViewCore extends StatefulWidget {
|
||||
class UserListCore extends StatefulWidget {
|
||||
/// Instantiate a new UserListView
|
||||
const UserListViewCore({
|
||||
const UserListCore({
|
||||
Key key,
|
||||
this.filter,
|
||||
this.options,
|
||||
@@ -98,10 +98,10 @@ class UserListViewCore extends StatefulWidget {
|
||||
final bool groupAlphabetically;
|
||||
|
||||
@override
|
||||
_UserListViewCoreState createState() => _UserListViewCoreState();
|
||||
_UserListCoreState createState() => _UserListCoreState();
|
||||
}
|
||||
|
||||
class _UserListViewCoreState extends State<UserListViewCore>
|
||||
class _UserListCoreState extends State<UserListCore>
|
||||
with WidgetsBindingObserver {
|
||||
@override
|
||||
void initState() {
|
||||
@@ -229,7 +229,7 @@ class _UserListViewCoreState extends State<UserListViewCore>
|
||||
}
|
||||
|
||||
@override
|
||||
void didUpdateWidget(UserListViewCore oldWidget) {
|
||||
void didUpdateWidget(UserListCore oldWidget) {
|
||||
super.didUpdateWidget(oldWidget);
|
||||
if (widget.filter?.toString() != oldWidget.filter?.toString() ||
|
||||
jsonEncode(widget.sort) != jsonEncode(oldWidget.sort) ||
|
||||
@@ -1,12 +1,12 @@
|
||||
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/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_list_view_core.dart';
|
||||
export 'src/message_search_list_core.dart';
|
||||
export 'src/stream_channel.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';
|
||||
|
||||
Reference in New Issue
Block a user