Browse Source

fix(neon): Qrcode login routing

pull/472/head
Nikolas Rimikis 1 year ago
parent
commit
6fd68a6114
No known key found for this signature in database
GPG Key ID: 85ED1DE9786A4FF2
  1. 6
      packages/neon/neon/lib/src/router.dart
  2. 4
      packages/neon/neon/lib/src/router.g.dart
  3. 4
      packages/neon/neon/pubspec.yaml

6
packages/neon/neon/lib/src/router.dart

@ -208,8 +208,9 @@ class LoginQrcodeRoute extends GoRouteData {
class LoginCheckServerStatusRoute extends GoRouteData {
const LoginCheckServerStatusRoute({
required this.serverUrl,
}) : loginName = null,
password = null;
this.loginName,
this.password,
});
const LoginCheckServerStatusRoute.withCredentials({
required this.serverUrl,
@ -303,6 +304,7 @@ class _AddAccountFlowRoute extends LoginFlowRoute {
const _AddAccountFlowRoute({
required super.serverUrl,
});
@override
String get serverUrl => super.serverUrl;
}

4
packages/neon/neon/lib/src/router.g.dart

@ -326,12 +326,16 @@ extension $LoginQrcodeRouteExtension on LoginQrcodeRoute {
extension $LoginCheckServerStatusRouteExtension on LoginCheckServerStatusRoute {
static LoginCheckServerStatusRoute _fromState(GoRouterState state) => LoginCheckServerStatusRoute(
serverUrl: state.queryParameters['server-url']!,
loginName: state.queryParameters['login-name'],
password: state.queryParameters['password'],
);
String get location => GoRouteData.$location(
'/login/check/server',
queryParams: {
'server-url': serverUrl,
if (loginName != null) 'login-name': loginName,
if (password != null) 'password': password,
},
);

4
packages/neon/neon/pubspec.yaml

@ -22,7 +22,7 @@ dependencies:
flutter_native_splash: ^2.2.19
flutter_svg: ^2.0.5
flutter_zxing: ^1.1.2 # ^1.2.0 downgrades to image ^3.0.0 which breaks our dependencies. See https://github.com/khoren93/flutter_zxing/issues/94
go_router: ^8.0.3
go_router: 8.0.3
http: ^0.13.6
intersperse: ^2.0.0
intl: ^0.18.0
@ -58,7 +58,7 @@ dependencies:
dev_dependencies:
build_runner: ^2.4.4
go_router_builder: ^2.0.1
go_router_builder: 2.1.1
json_serializable: ^6.6.2
nit_picking:
git:

Loading…
Cancel
Save