Browse Source

Merge pull request #472 from provokateurin/fix/go_router

Fix/go router
pull/481/head
Nikolas Rimikis 1 year ago committed by GitHub
parent
commit
0e11fd5190
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      packages/app/pubspec.lock
  2. 6
      packages/neon/neon/lib/src/router.dart
  3. 14
      packages/neon/neon/lib/src/router.g.dart
  4. 4
      packages/neon/neon/pubspec.yaml
  5. 4
      packages/neon/neon_files/pubspec.yaml
  6. 4
      packages/neon/neon_news/pubspec.yaml
  7. 4
      packages/neon/neon_notes/pubspec.yaml
  8. 4
      packages/neon/neon_notifications/pubspec.yaml

4
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:

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;
}

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

@ -159,6 +159,8 @@ extension $_AddAccountFlowRouteExtension on _AddAccountFlowRoute {
Future<T?> push<T>(BuildContext context) => context.push<T>(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<T?> push<T>(BuildContext context) => context.push<T>(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<T?> push<T>(BuildContext context) => context.push<T>(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<T?> push<T>(BuildContext context) => context.push<T>(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<T?> push<T>(BuildContext context) => context.push<T>(location);
void pushReplacement(BuildContext context) => context.pushReplacement(location);
void replace(BuildContext context) => context.replace(location);
}
extension $LoginQrcodeRouteExtension on LoginQrcodeRoute {
@ -326,12 +336,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: ^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.0.1
go_router_builder: ^2.2.1
json_serializable: ^6.6.2
nit_picking:
git:

4
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

4
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

4
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

4
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

Loading…
Cancel
Save