mirror of
https://gitlab.com/veilid/veilidchat.git
synced 2025-05-08 17:25:01 -04:00
move keyboard shortcuts into own file
This commit is contained in:
parent
d6b1c20906
commit
6830b54ce8
4 changed files with 19 additions and 70 deletions
|
@ -16,6 +16,8 @@ import '../../tools/tools.dart';
|
|||
import '../../veilid_processor/views/developer.dart';
|
||||
import '../views/router_shell.dart';
|
||||
|
||||
export 'package:go_router/go_router.dart';
|
||||
|
||||
part 'router_cubit.freezed.dart';
|
||||
part 'router_cubit.g.dart';
|
||||
|
||||
|
@ -164,3 +166,14 @@ class RouterCubit extends Cubit<RouterState> {
|
|||
_accountRepositorySubscription;
|
||||
GoRouter? _router;
|
||||
}
|
||||
|
||||
extension GoRouterExtension on GoRouter {
|
||||
String location() {
|
||||
final lastMatch = routerDelegate.currentConfiguration.last;
|
||||
final matchList = lastMatch is ImperativeRouteMatch
|
||||
? lastMatch.matches
|
||||
: routerDelegate.currentConfiguration;
|
||||
final location = matchList.uri.toString();
|
||||
return location;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue