Configure routes in example project.
This commit is contained in:
@@ -8,6 +8,7 @@ import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:stream_chat_flutter/stream_chat_flutter.dart';
|
||||
|
||||
import 'notifications_service.dart';
|
||||
import 'routes/routes.dart';
|
||||
|
||||
const kStreamApiKey = 'STREAM_API_KEY';
|
||||
const kStreamUserId = 'STREAM_USER_ID';
|
||||
@@ -154,18 +155,10 @@ class ChooseUserPage extends StatelessWidget {
|
||||
if (!kIsWeb) {
|
||||
initNotifications(client);
|
||||
}
|
||||
|
||||
Navigator.pop(context);
|
||||
await Navigator.pushReplacement(
|
||||
Navigator.pushReplacementNamed(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) {
|
||||
return StreamChat(
|
||||
client: client,
|
||||
child: ChannelListPage(),
|
||||
);
|
||||
},
|
||||
),
|
||||
Routes.CHANNEL_LIST,
|
||||
arguments: client,
|
||||
);
|
||||
},
|
||||
leading: UserAvatar(
|
||||
@@ -188,12 +181,7 @@ class ChooseUserPage extends StatelessWidget {
|
||||
}),
|
||||
ListTile(
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => AdvancedOptionsPage(),
|
||||
),
|
||||
);
|
||||
Navigator.pushNamed(context, Routes.ADVANCED_OPTIONS);
|
||||
},
|
||||
leading: CircleAvatar(
|
||||
child: StreamSvgIcon.settings(
|
||||
|
||||
Reference in New Issue
Block a user