Configure routes in example project.

This commit is contained in:
xsahil03x
2020-11-25 22:37:11 +05:30
parent 806b34f092
commit ed3fc88f62
7 changed files with 124 additions and 82 deletions
+7 -12
View File
@@ -3,6 +3,7 @@ import 'package:stream_chat_flutter/stream_chat_flutter.dart';
import 'package:uuid/uuid.dart';
import 'main.dart';
import 'routes/routes.dart';
class GroupChatDetailsScreen extends StatefulWidget {
final List<User> selectedUsers;
@@ -128,18 +129,12 @@ class _GroupChatDetailsScreenState extends State<GroupChatDetailsScreen> {
'name': groupName,
});
await channel.watch();
Navigator.of(context)
..pop()
..pushReplacement(
MaterialPageRoute(
builder: (context) {
return StreamChannel(
child: ChannelPage(),
channel: channel,
);
},
),
);
Navigator.pushNamedAndRemoveUntil(
context,
Routes.CHANNEL_PAGE,
ModalRoute.withName(Routes.CHANNEL_LIST),
arguments: channel,
);
},
),
),