add reactions
This commit is contained in:
+11
-9
@@ -8,10 +8,12 @@ void main() async {
|
|||||||
logLevel: Level.INFO,
|
logLevel: Level.INFO,
|
||||||
);
|
);
|
||||||
|
|
||||||
await client.setUser(
|
await client
|
||||||
User(id: 'super-band-9'),
|
.setUser(
|
||||||
'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoic3VwZXItYmFuZC05In0.0L6lGoeLwkz0aZRUcpZKsvaXtNEDHBcezVTZ0oPq40A',
|
User(id: 'super-band-9'),
|
||||||
);
|
'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoic3VwZXItYmFuZC05In0.0L6lGoeLwkz0aZRUcpZKsvaXtNEDHBcezVTZ0oPq40A',
|
||||||
|
)
|
||||||
|
.catchError((e) {});
|
||||||
|
|
||||||
runApp(MyApp(client));
|
runApp(MyApp(client));
|
||||||
}
|
}
|
||||||
@@ -44,11 +46,11 @@ class ChannelListPage extends StatelessWidget {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
body: ChannelListView(
|
body: ChannelListView(
|
||||||
// filter: {
|
filter: {
|
||||||
// 'members': {
|
'members': {
|
||||||
// '\$in': [StreamChat.of(context).user.id],
|
'\$in': [StreamChat.of(context).user.id],
|
||||||
// }
|
}
|
||||||
// },
|
},
|
||||||
sort: [SortOption('last_message_at')],
|
sort: [SortOption('last_message_at')],
|
||||||
pagination: PaginationParams(
|
pagination: PaginationParams(
|
||||||
limit: 20,
|
limit: 20,
|
||||||
|
|||||||
@@ -215,9 +215,11 @@ class _MessageListViewState extends State<MessageListView> {
|
|||||||
initialData: false,
|
initialData: false,
|
||||||
builder: (context, snapshot) {
|
builder: (context, snapshot) {
|
||||||
if (snapshot.hasError) {
|
if (snapshot.hasError) {
|
||||||
print((snapshot.error as Error).stackTrace.toString());
|
return Container(
|
||||||
return Center(
|
color: Color(0xffd0021B).withAlpha(26),
|
||||||
child: Text(snapshot.error.toString()),
|
child: Center(
|
||||||
|
child: Text('Error loading messages'),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (!snapshot.data) {
|
if (!snapshot.data) {
|
||||||
|
|||||||
Reference in New Issue
Block a user