Browse Source

fix(deps): update dependency go_router to v12

pull/988/head
renovate[bot] 1 year ago committed by jld3103
parent
commit
ac6f3ed7c8
No known key found for this signature in database
GPG Key ID: 9062417B9E8EB7B3
  1. 4
      packages/app/pubspec.lock
  2. 2
      packages/neon/neon/lib/src/app.dart
  3. 85
      packages/neon/neon/lib/src/router.dart
  4. 2
      packages/neon/neon/pubspec.yaml
  5. 2
      packages/neon/neon_files/pubspec.yaml
  6. 2
      packages/neon/neon_news/pubspec.yaml
  7. 2
      packages/neon/neon_notes/pubspec.yaml
  8. 2
      packages/neon/neon_notifications/pubspec.yaml

4
packages/app/pubspec.lock

@ -433,10 +433,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: go_router name: go_router
sha256: "2ccd74480706e0a70a0e0dfa9543dede41bc11d0fe3b146a6ad7b7686f6b4407" sha256: a206cc4621a644531a2e05e7774616ab4d9d85eab1f3b0e255f3102937fccab1
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "11.1.4" version: "12.0.0"
html: html:
dependency: transitive dependency: transitive
description: description:

2
packages/neon/neon/lib/src/app.dart

@ -48,7 +48,7 @@ class _NeonAppState extends State<NeonApp> with WidgetsBindingObserver, tray.Tra
late final Iterable<AppImplementation> _appImplementations; late final Iterable<AppImplementation> _appImplementations;
late final GlobalOptions _globalOptions; late final GlobalOptions _globalOptions;
late final AccountsBloc _accountsBloc; late final AccountsBloc _accountsBloc;
late final _routerDelegate = AppRouter( late final _routerDelegate = buildAppRouter(
navigatorKey: _navigatorKey, navigatorKey: _navigatorKey,
accountsBloc: _accountsBloc, accountsBloc: _accountsBloc,
); );

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

@ -25,49 +25,48 @@ import 'package:neon/src/utils/stream_listenable.dart';
part 'router.g.dart'; part 'router.g.dart';
@internal @internal
class AppRouter extends GoRouter { GoRouter buildAppRouter({
AppRouter({ required final GlobalKey<NavigatorState> navigatorKey,
required final GlobalKey<NavigatorState> navigatorKey, required final AccountsBloc accountsBloc,
required final AccountsBloc accountsBloc, }) =>
}) : super( GoRouter(
debugLogDiagnostics: kDebugMode, debugLogDiagnostics: kDebugMode,
refreshListenable: StreamListenable(accountsBloc.activeAccount), refreshListenable: StreamListenable(accountsBloc.activeAccount),
navigatorKey: navigatorKey, navigatorKey: navigatorKey,
initialLocation: const HomeRoute().location, initialLocation: const HomeRoute().location,
errorPageBuilder: _buildErrorPage, errorPageBuilder: _buildErrorPage,
redirect: (final context, final state) { redirect: (final context, final state) {
final loginQRcode = LoginQRcode.tryParse(state.uri.toString()); final loginQRcode = LoginQRcode.tryParse(state.uri.toString());
if (loginQRcode != null) { if (loginQRcode != null) {
return LoginCheckServerStatusRoute.withCredentials( return LoginCheckServerStatusRoute.withCredentials(
serverUrl: loginQRcode.serverURL, serverUrl: loginQRcode.serverURL,
loginName: loginQRcode.username, loginName: loginQRcode.username,
password: loginQRcode.password, password: loginQRcode.password,
).location; ).location;
} }
if (accountsBloc.hasAccounts && state.uri.hasScheme) { if (accountsBloc.hasAccounts && state.uri.hasScheme) {
final strippedUri = accountsBloc.activeAccount.value!.stripUri(state.uri); final strippedUri = accountsBloc.activeAccount.value!.stripUri(state.uri);
if (strippedUri != state.uri) { if (strippedUri != state.uri) {
return strippedUri.toString(); return strippedUri.toString();
} }
} }
// redirect to login screen when no account is logged in // redirect to login screen when no account is logged in
if (!accountsBloc.hasAccounts && !state.uri.toString().startsWith(const LoginRoute().location)) { if (!accountsBloc.hasAccounts && !state.uri.toString().startsWith(const LoginRoute().location)) {
return const LoginRoute().location; return const LoginRoute().location;
} }
return null; return null;
}, },
routes: $appRoutes, routes: $appRoutes,
); );
static Page<void> _buildErrorPage(final BuildContext context, final GoRouterState state) => MaterialPage( Page<void> _buildErrorPage(final BuildContext context, final GoRouterState state) => MaterialPage(
child: RouteNotFoundPage( child: RouteNotFoundPage(
uri: state.uri, uri: state.uri,
), ),
); );
}
@immutable @immutable
class AccountSettingsRoute extends GoRouteData { class AccountSettingsRoute extends GoRouteData {

2
packages/neon/neon/pubspec.yaml

@ -22,7 +22,7 @@ dependencies:
flutter_native_splash: ^2.0.0 flutter_native_splash: ^2.0.0
flutter_svg: ^2.0.0 flutter_svg: ^2.0.0
flutter_zxing: ^1.0.0 flutter_zxing: ^1.0.0
go_router: ^11.0.0 go_router: ^12.0.0
http: ^1.0.0 http: ^1.0.0
image: ^4.0.0 image: ^4.0.0
intersperse: ^2.0.0 intersperse: ^2.0.0

2
packages/neon/neon_files/pubspec.yaml

@ -19,7 +19,7 @@ dependencies:
flutter_localizations: flutter_localizations:
sdk: flutter sdk: flutter
flutter_material_design_icons: ^1.0.0 flutter_material_design_icons: ^1.0.0
go_router: ^11.0.0 go_router: ^12.0.0
image_picker: ^1.0.0 image_picker: ^1.0.0
intl: ^0.18.0 intl: ^0.18.0
neon: neon:

2
packages/neon/neon_news/pubspec.yaml

@ -13,7 +13,7 @@ dependencies:
flutter_localizations: flutter_localizations:
sdk: flutter sdk: flutter
flutter_material_design_icons: ^1.0.0 flutter_material_design_icons: ^1.0.0
go_router: ^11.0.0 go_router: ^12.0.0
html: ^0.15.0 html: ^0.15.0
intl: ^0.18.0 intl: ^0.18.0
neon: neon:

2
packages/neon/neon_notes/pubspec.yaml

@ -15,7 +15,7 @@ dependencies:
sdk: flutter sdk: flutter
flutter_markdown: ^0.6.0 flutter_markdown: ^0.6.0
flutter_material_design_icons: ^1.0.0 flutter_material_design_icons: ^1.0.0
go_router: ^11.0.0 go_router: ^12.0.0
intl: ^0.18.0 intl: ^0.18.0
neon: neon:
git: git:

2
packages/neon/neon_notifications/pubspec.yaml

@ -12,7 +12,7 @@ dependencies:
flutter_localizations: flutter_localizations:
sdk: flutter sdk: flutter
flutter_material_design_icons: ^1.0.0 flutter_material_design_icons: ^1.0.0
go_router: ^11.0.0 go_router: ^12.0.0
intl: ^0.18.0 intl: ^0.18.0
neon: neon:
git: git:

Loading…
Cancel
Save