From 6fd68a6114c276b2ff783d84c10320f7f0b79d32 Mon Sep 17 00:00:00 2001 From: Nikolas Rimikis Date: Fri, 14 Jul 2023 11:40:35 +0200 Subject: [PATCH 1/7] fix(neon): Qrcode login routing --- packages/neon/neon/lib/src/router.dart | 6 ++++-- packages/neon/neon/lib/src/router.g.dart | 4 ++++ packages/neon/neon/pubspec.yaml | 4 ++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/packages/neon/neon/lib/src/router.dart b/packages/neon/neon/lib/src/router.dart index ceb05c0c..9516e05c 100644 --- a/packages/neon/neon/lib/src/router.dart +++ b/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; } diff --git a/packages/neon/neon/lib/src/router.g.dart b/packages/neon/neon/lib/src/router.g.dart index 33f3e75d..35985eb7 100644 --- a/packages/neon/neon/lib/src/router.g.dart +++ b/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, }, ); diff --git a/packages/neon/neon/pubspec.yaml b/packages/neon/neon/pubspec.yaml index 0479da47..b54e10af 100644 --- a/packages/neon/neon/pubspec.yaml +++ b/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: From 2ad5b81ca40952e30cc75dee500373e63e1a53ef Mon Sep 17 00:00:00 2001 From: Nikolas Rimikis Date: Sat, 15 Jul 2023 10:52:44 +0200 Subject: [PATCH 2/7] chore(neon_notifications): bump go_router and go_router_builder --- packages/neon/neon_notifications/pubspec.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/neon/neon_notifications/pubspec.yaml b/packages/neon/neon_notifications/pubspec.yaml index 944ebdef..e601ae47 100644 --- a/packages/neon/neon_notifications/pubspec.yaml +++ b/packages/neon/neon_notifications/pubspec.yaml @@ -9,7 +9,7 @@ environment: dependencies: flutter: sdk: flutter - go_router: ^8.0.3 + go_router: ^9.0.3 material_design_icons_flutter: ^7.0.7296 neon: git: @@ -24,7 +24,7 @@ dependencies: dev_dependencies: build_runner: ^2.4.4 - go_router_builder: ^2.0.2 + go_router_builder: ^2.2.1 nit_picking: git: url: https://github.com/stack11/dart_nit_picking From e2bd1aeb05e507b7770dd53052b63026affcd918 Mon Sep 17 00:00:00 2001 From: Nikolas Rimikis Date: Sat, 15 Jul 2023 10:53:38 +0200 Subject: [PATCH 3/7] chore(neon_news): bump go_router and go_router_builder --- packages/neon/neon_news/pubspec.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/neon/neon_news/pubspec.yaml b/packages/neon/neon_news/pubspec.yaml index d0c003ac..b43df5c0 100644 --- a/packages/neon/neon_news/pubspec.yaml +++ b/packages/neon/neon_news/pubspec.yaml @@ -10,7 +10,7 @@ dependencies: flutter: sdk: flutter flutter_html: ^3.0.0-alpha.6 - go_router: ^8.0.3 + go_router: ^9.0.3 html: ^0.15.3 material_design_icons_flutter: ^7.0.7296 neon: @@ -30,7 +30,7 @@ dependencies: dev_dependencies: build_runner: ^2.4.4 - go_router_builder: ^2.0.2 + go_router_builder: ^2.2.1 nit_picking: git: url: https://github.com/stack11/dart_nit_picking From 9d1a99117c01f140652963f49238457daba165f5 Mon Sep 17 00:00:00 2001 From: Nikolas Rimikis Date: Sat, 15 Jul 2023 10:54:02 +0200 Subject: [PATCH 4/7] chore(neon_files): bump go_router and go_router_builder --- packages/neon/neon_files/pubspec.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/neon/neon_files/pubspec.yaml b/packages/neon/neon_files/pubspec.yaml index f33d30f4..b6fab5c6 100644 --- a/packages/neon/neon_files/pubspec.yaml +++ b/packages/neon/neon_files/pubspec.yaml @@ -16,7 +16,7 @@ dependencies: filesize: ^2.0.1 flutter: sdk: flutter - go_router: ^8.0.3 + go_router: ^9.0.3 image_picker: ^0.8.7+5 intersperse: ^2.0.0 material_design_icons_flutter: ^7.0.7296 @@ -37,7 +37,7 @@ dependencies: dev_dependencies: build_runner: ^2.4.4 - go_router_builder: ^2.0.2 + go_router_builder: ^2.2.1 nit_picking: git: url: https://github.com/stack11/dart_nit_picking From 5c838efc8292eaa5d8aa18e3e6b624da7b75f590 Mon Sep 17 00:00:00 2001 From: Nikolas Rimikis Date: Sat, 15 Jul 2023 10:54:31 +0200 Subject: [PATCH 5/7] chore(neon_notes): bump go_router and go_router_builder --- packages/neon/neon_notes/pubspec.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/neon/neon_notes/pubspec.yaml b/packages/neon/neon_notes/pubspec.yaml index e151e5a6..31f9a3bc 100644 --- a/packages/neon/neon_notes/pubspec.yaml +++ b/packages/neon/neon_notes/pubspec.yaml @@ -12,7 +12,7 @@ dependencies: flutter: sdk: flutter flutter_markdown: ^0.6.14 - go_router: ^8.0.3 + go_router: ^9.0.3 material_design_icons_flutter: ^7.0.7296 neon: git: @@ -30,7 +30,7 @@ dependencies: dev_dependencies: build_runner: ^2.4.4 - go_router_builder: ^2.0.2 + go_router_builder: ^2.2.1 nit_picking: git: url: https://github.com/stack11/dart_nit_picking From 5d7580be8a7de2e2e89028c89eba22e9306dc48a Mon Sep 17 00:00:00 2001 From: Nikolas Rimikis Date: Sat, 15 Jul 2023 11:12:58 +0200 Subject: [PATCH 6/7] chore(neon): bump go_router and go_router_builder --- packages/neon/neon/lib/src/router.g.dart | 10 ++++++++++ packages/neon/neon/pubspec.yaml | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/packages/neon/neon/lib/src/router.g.dart b/packages/neon/neon/lib/src/router.g.dart index 35985eb7..a8d1e57f 100644 --- a/packages/neon/neon/lib/src/router.g.dart +++ b/packages/neon/neon/lib/src/router.g.dart @@ -159,6 +159,8 @@ extension $_AddAccountFlowRouteExtension on _AddAccountFlowRoute { Future push(BuildContext context) => context.push(location); void pushReplacement(BuildContext context) => context.pushReplacement(location); + + void replace(BuildContext context) => context.replace(location); } extension $_AddAccountQrcodeRouteExtension on _AddAccountQrcodeRoute { @@ -173,6 +175,8 @@ extension $_AddAccountQrcodeRouteExtension on _AddAccountQrcodeRoute { Future push(BuildContext context) => context.push(location); void pushReplacement(BuildContext context) => context.pushReplacement(location); + + void replace(BuildContext context) => context.replace(location); } extension $_AddAccountCheckServerStatusRouteExtension on _AddAccountCheckServerStatusRoute { @@ -192,6 +196,8 @@ extension $_AddAccountCheckServerStatusRouteExtension on _AddAccountCheckServerS Future push(BuildContext context) => context.push(location); void pushReplacement(BuildContext context) => context.pushReplacement(location); + + void replace(BuildContext context) => context.replace(location); } extension $_AddAccountCheckAccountRouteExtension on _AddAccountCheckAccountRoute { @@ -215,6 +221,8 @@ extension $_AddAccountCheckAccountRouteExtension on _AddAccountCheckAccountRoute Future push(BuildContext context) => context.push(location); void pushReplacement(BuildContext context) => context.pushReplacement(location); + + void replace(BuildContext context) => context.replace(location); } extension $AccountSettingsRouteExtension on AccountSettingsRoute { @@ -305,6 +313,8 @@ extension $LoginFlowRouteExtension on LoginFlowRoute { Future push(BuildContext context) => context.push(location); void pushReplacement(BuildContext context) => context.pushReplacement(location); + + void replace(BuildContext context) => context.replace(location); } extension $LoginQrcodeRouteExtension on LoginQrcodeRoute { diff --git a/packages/neon/neon/pubspec.yaml b/packages/neon/neon/pubspec.yaml index b54e10af..cb309c5c 100644 --- a/packages/neon/neon/pubspec.yaml +++ b/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: ^9.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.1.1 + go_router_builder: ^2.2.1 json_serializable: ^6.6.2 nit_picking: git: From ab4be98989d58a38494d8ccf00fd75fd01b5ee3e Mon Sep 17 00:00:00 2001 From: Nikolas Rimikis Date: Sat, 15 Jul 2023 11:13:47 +0200 Subject: [PATCH 7/7] chore(app): update pubspec.lock --- packages/app/pubspec.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/app/pubspec.lock b/packages/app/pubspec.lock index 10a17114..4dc1921b 100644 --- a/packages/app/pubspec.lock +++ b/packages/app/pubspec.lock @@ -449,10 +449,10 @@ packages: dependency: transitive description: name: go_router - sha256: d687b6129476c92bd75244b8dfc1bb56f9a287ab3d51cdf0baf570afeb923c51 + sha256: b33a88c67816312597e5e0f5906c5139a0b9bd9bb137346e872c788da7af8ea0 url: "https://pub.dev" source: hosted - version: "8.0.3" + version: "9.0.3" graphs: dependency: transitive description: