refactor: Migrate from pathsegment routing
This commit is contained in:
parent
b7dac8365a
commit
b715eff839
15 changed files with 20 additions and 23 deletions
|
|
@ -218,7 +218,7 @@ class ChatController extends State<ChatPageWithRoom> {
|
|||
);
|
||||
final roomId = success.result;
|
||||
if (roomId == null) return;
|
||||
context.go(['', 'rooms', roomId].join('/'));
|
||||
context.go('/rooms/$roomId');
|
||||
}
|
||||
|
||||
void leaveChat() async {
|
||||
|
|
@ -1055,7 +1055,7 @@ class ChatController extends State<ChatPageWithRoom> {
|
|||
future: room.leave,
|
||||
);
|
||||
if (result.error == null) {
|
||||
context.go(['', 'rooms', result.result!].join('/'));
|
||||
context.go('/rooms/${result.result!}');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ class ChatAppBarTitle extends StatelessWidget {
|
|||
highlightColor: Colors.transparent,
|
||||
onTap: controller.isArchived
|
||||
? null
|
||||
: () => context.go(['', 'rooms', room.id, 'details'].join('/')),
|
||||
: () => context.go('/rooms/${room.id}/details'),
|
||||
child: Row(
|
||||
children: [
|
||||
Hero(
|
||||
|
|
|
|||
|
|
@ -38,8 +38,7 @@ class EncryptionButton extends StatelessWidget {
|
|||
? Colors.orange
|
||||
: null,
|
||||
),
|
||||
onPressed: () =>
|
||||
context.go(['', 'rooms', room.id, 'encryption'].join('/')),
|
||||
onPressed: () => context.go('/rooms/${room.id}/encryption'),
|
||||
),
|
||||
);
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue