bump deps

This commit is contained in:
Salvatore Giordano
2021-05-17 15:48:03 +02:00
parent 0e506c6df7
commit 273b24bcd8
2 changed files with 61 additions and 73 deletions
+56 -68
View File
@@ -1,18 +1,7 @@
import 'package:flutter/cupertino.dart';
import 'package:intl/date_symbol_data_local.dart';
import 'package:stream_chat_flutter/stream_chat_flutter.dart'
show
Channel,
ChannelListController,
ChannelListCore,
ChannelsBloc,
LazyLoadScrollView,
Level,
PaginationParams,
SortOption,
StreamChatClient,
StreamChatCore,
User;
hide ChannelListView;
import 'package:imessage/channel_list_view.dart';
@@ -61,61 +50,60 @@ class ChatLoader extends StatelessWidget {
Widget build(BuildContext context) {
final user = StreamChatCore.of(context).user;
return CupertinoPageScaffold(
child: ChannelsBloc(
child: ChannelListCore(
channelListController: channelListController,
filter: {
'members': {
r'$in': [user.id],
},
'type': {
r'$eq': 'messaging',
},
},
sort: [SortOption('last_message_at')],
pagination: PaginationParams(
limit: 20,
),
emptyBuilder: (BuildContext context) {
return Center(
child: Text('Looks like you are not in any channels'),
);
},
loadingBuilder: (BuildContext context) {
return Center(
child: SizedBox(
height: 100.0,
width: 100.0,
child: CupertinoActivityIndicator(),
),
);
},
errorBuilder: (BuildContext context, dynamic error) {
return Center(
child: Text(
'Oh no, something went wrong. Please check your config.'),
);
},
listBuilder: (
BuildContext context,
List<Channel> channels,
) =>
LazyLoadScrollView(
onEndOfPage: () async {
channelListController.paginateData();
},
child: CustomScrollView(
slivers: [
CupertinoSliverRefreshControl(onRefresh: () async {
channelListController.loadData();
}),
ChannelPageAppBar(),
SliverPadding(
sliver: ChannelListView(channels: channels),
padding: const EdgeInsets.only(top: 16),
)
],
),
))));
child: ChannelsBloc(
child: ChannelListCore(
channelListController: channelListController,
filter: Filter.and([
Filter.in_('members', [user.id]),
Filter.equal('type', 'messaging'),
]),
sort: [SortOption('last_message_at')],
pagination: PaginationParams(
limit: 20,
),
emptyBuilder: (BuildContext context) {
return Center(
child: Text('Looks like you are not in any channels'),
);
},
loadingBuilder: (BuildContext context) {
return Center(
child: SizedBox(
height: 100.0,
width: 100.0,
child: CupertinoActivityIndicator(),
),
);
},
errorBuilder: (BuildContext context, dynamic error) {
return Center(
child: Text(
'Oh no, something went wrong. Please check your config.'),
);
},
listBuilder: (
BuildContext context,
List<Channel> channels,
) =>
LazyLoadScrollView(
onEndOfPage: () async {
return channelListController.paginateData();
},
child: CustomScrollView(
slivers: [
CupertinoSliverRefreshControl(onRefresh: () async {
return channelListController.loadData();
}),
ChannelPageAppBar(),
SliverPadding(
sliver: ChannelListView(channels: channels),
padding: const EdgeInsets.only(top: 16),
)
],
),
),
),
),
);
}
}
+5 -5
View File
@@ -23,11 +23,11 @@ environment:
dependencies:
flutter:
sdk: flutter
intl: ^0.16.1
stream_chat_flutter: ^1.3.0-beta
animations: ^1.0.0+5
collection: ^1.14.13
cached_network_image: ^2.0.0-rc
intl: ^0.17.0
stream_chat_flutter: ^2.0.0-nullsafety.3
animations: ^2.0.0
collection: ^1.15.0
cached_network_image: ^3.0.0
# The following adds the Cupertino Icons font to your application.