refactor: Migrate routes to go router

This commit is contained in:
krille-chan 2023-08-07 18:40:02 +02:00
commit ee957ab1f6
No known key found for this signature in database
52 changed files with 584 additions and 612 deletions

View file

@ -28,7 +28,7 @@ class InvitationSelectionController extends State<InvitationSelection> {
List<Profile> foundProfiles = [];
Timer? coolDown;
String? get roomId => VRouter.of(context).pathParameters['roomid'];
String? get roomId => GoRouterState.of(context).pathParameters['roomid'];
Future<List<User>> getContacts(BuildContext context) async {
final client = Matrix.of(context).client;

View file

@ -20,12 +20,12 @@ class InvitationSelectionView extends StatelessWidget {
final groupName = room.name.isEmpty ? L10n.of(context)!.group : room.name;
return Scaffold(
appBar: AppBar(
leading: VRouter.of(context).path.startsWith('/spaces/')
leading: GoRouterState.of(context).uri.path.startsWith('/spaces/')
? null
: IconButton(
icon: const Icon(Icons.close_outlined),
onPressed: () => VRouter.of(context)
.toSegments(['rooms', controller.roomId!]),
onPressed: () =>
context.go(['', 'rooms', controller.roomId!].join('/')),
),
titleSpacing: 0,
title: SizedBox(