update examples
This commit is contained in:
@@ -267,7 +267,7 @@ SPEC CHECKSUMS:
|
|||||||
PromisesObjC: c119f3cd559f50b7ae681fa59dc1acd19173b7e6
|
PromisesObjC: c119f3cd559f50b7ae681fa59dc1acd19173b7e6
|
||||||
Protobuf: 176220c526ad8bd09ab1fb40a978eac3fef665f7
|
Protobuf: 176220c526ad8bd09ab1fb40a978eac3fef665f7
|
||||||
ReachabilitySwift: 4032e2f59586e11e3b0ebe15b167abdd587a388b
|
ReachabilitySwift: 4032e2f59586e11e3b0ebe15b167abdd587a388b
|
||||||
shared_preferences: 430726339841afefe5142b9c1f50cb6bd7793e01
|
shared_preferences: af6bfa751691cdc24be3045c43ec037377ada40d
|
||||||
shared_preferences_macos: f3f29b71ccbb56bf40c9dd6396c9acf15e214087
|
shared_preferences_macos: f3f29b71ccbb56bf40c9dd6396c9acf15e214087
|
||||||
shared_preferences_web: 141cce0c3ed1a1c5bf2a0e44f52d31eeb66e5ea9
|
shared_preferences_web: 141cce0c3ed1a1c5bf2a0e44f52d31eeb66e5ea9
|
||||||
sqflite: 4001a31ff81d210346b500c55b17f4d6c7589dd0
|
sqflite: 4001a31ff81d210346b500c55b17f4d6c7589dd0
|
||||||
|
|||||||
@@ -50,17 +50,19 @@ class ChannelListPage extends StatelessWidget {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
body: ChannelListView(
|
body: ChannelsBloc(
|
||||||
filter: {
|
child: ChannelListView(
|
||||||
'members': {
|
filter: {
|
||||||
'\$in': [StreamChat.of(context).user.id],
|
'members': {
|
||||||
}
|
'\$in': [StreamChat.of(context).user.id],
|
||||||
},
|
}
|
||||||
sort: [SortOption('last_message_at')],
|
},
|
||||||
pagination: PaginationParams(
|
sort: [SortOption('last_message_at')],
|
||||||
limit: 20,
|
pagination: PaginationParams(
|
||||||
|
limit: 20,
|
||||||
|
),
|
||||||
|
channelWidget: ChannelPage(),
|
||||||
),
|
),
|
||||||
channelWidget: ChannelPage(),
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -70,17 +70,19 @@ class ChannelListPage extends StatelessWidget {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
body: ChannelListView(
|
body: ChannelsBloc(
|
||||||
filter: {
|
child: ChannelListView(
|
||||||
'members': {
|
filter: {
|
||||||
'\$in': [StreamChat.of(context).user.id],
|
'members': {
|
||||||
}
|
'\$in': [StreamChat.of(context).user.id],
|
||||||
},
|
}
|
||||||
sort: [SortOption('last_message_at')],
|
},
|
||||||
pagination: PaginationParams(
|
sort: [SortOption('last_message_at')],
|
||||||
limit: 20,
|
pagination: PaginationParams(
|
||||||
|
limit: 20,
|
||||||
|
),
|
||||||
|
channelWidget: ChannelPage(),
|
||||||
),
|
),
|
||||||
channelWidget: ChannelPage(),
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,18 +55,20 @@ class ChannelListPage extends StatelessWidget {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
body: ChannelListView(
|
body: ChannelsBloc(
|
||||||
filter: {
|
child: ChannelListView(
|
||||||
'members': {
|
filter: {
|
||||||
'\$in': [StreamChat.of(context).user.id],
|
'members': {
|
||||||
|
'\$in': [StreamChat.of(context).user.id],
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
channelPreviewBuilder: _channelPreviewBuilder,
|
||||||
channelPreviewBuilder: _channelPreviewBuilder,
|
sort: [SortOption('last_message_at')],
|
||||||
sort: [SortOption('last_message_at')],
|
pagination: PaginationParams(
|
||||||
pagination: PaginationParams(
|
limit: 20,
|
||||||
limit: 20,
|
),
|
||||||
|
channelWidget: ChannelPage(),
|
||||||
),
|
),
|
||||||
channelWidget: ChannelPage(),
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,16 +65,15 @@ void _initNotifications(Client client) {
|
|||||||
|
|
||||||
void main() async {
|
void main() async {
|
||||||
final client = Client(
|
final client = Client(
|
||||||
's2dxdhpxd94g',
|
'b67pax5b2wdq',
|
||||||
logLevel: Level.INFO,
|
logLevel: Level.INFO,
|
||||||
showLocalNotification: Platform.isAndroid ? showLocalNotification : null,
|
showLocalNotification: Platform.isAndroid ? showLocalNotification : null,
|
||||||
);
|
);
|
||||||
|
|
||||||
await client.setUser(
|
await client.setUser(
|
||||||
User(id: 'user1'),
|
User(id: 'falling-mountain-7'),
|
||||||
'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidXNlcjEifQ.NGZPyPMx7KSVisJmh4tJhOIv7ZjCaMQpOh4gTINvCaU',
|
'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiZmFsbGluZy1tb3VudGFpbi03In0.AKgRXHMQQMz6vJAKszXdY8zMFfsAgkoUeZHlI-Szz9E',
|
||||||
);
|
);
|
||||||
|
|
||||||
_initNotifications(client);
|
_initNotifications(client);
|
||||||
|
|
||||||
runApp(MyApp(client));
|
runApp(MyApp(client));
|
||||||
|
|||||||
@@ -54,17 +54,19 @@ class ChannelListPage extends StatelessWidget {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
body: ChannelListView(
|
body: ChannelsBloc(
|
||||||
filter: {
|
child: ChannelListView(
|
||||||
'members': {
|
filter: {
|
||||||
'\$in': [StreamChat.of(context).user.id],
|
'members': {
|
||||||
}
|
'\$in': [StreamChat.of(context).user.id],
|
||||||
},
|
}
|
||||||
sort: [SortOption('last_message_at')],
|
},
|
||||||
pagination: PaginationParams(
|
sort: [SortOption('last_message_at')],
|
||||||
limit: 20,
|
pagination: PaginationParams(
|
||||||
|
limit: 20,
|
||||||
|
),
|
||||||
|
channelWidget: ChannelPage(),
|
||||||
),
|
),
|
||||||
channelWidget: ChannelPage(),
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
+12
-10
@@ -45,17 +45,19 @@ class ChannelListPage extends StatelessWidget {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
body: ChannelListView(
|
body: ChannelsBloc(
|
||||||
filter: {
|
child: ChannelListView(
|
||||||
'members': {
|
filter: {
|
||||||
'\$in': [StreamChat.of(context).user.id],
|
'members': {
|
||||||
}
|
'\$in': [StreamChat.of(context).user.id],
|
||||||
},
|
}
|
||||||
sort: [SortOption('last_message_at')],
|
},
|
||||||
pagination: PaginationParams(
|
sort: [SortOption('last_message_at')],
|
||||||
limit: 20,
|
pagination: PaginationParams(
|
||||||
|
limit: 20,
|
||||||
|
),
|
||||||
|
channelWidget: ChannelPage(),
|
||||||
),
|
),
|
||||||
channelWidget: ChannelPage(),
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user