Browse Source

refactor(neon,neon_files,neon_news,neon_notes,neon_notifications): rename NeonAppRoute to NeonBaseAppRoute

Signed-off-by: Nikolas Rimikis <leptopoda@users.noreply.github.com>
pull/879/head
Nikolas Rimikis 1 year ago
parent
commit
21e3fe14fe
No known key found for this signature in database
GPG Key ID: 85ED1DE9786A4FF2
  1. 9
      packages/neon/neon/lib/src/utils/app_route.dart
  2. 4
      packages/neon/neon_files/lib/routes.dart
  3. 4
      packages/neon/neon_news/lib/routes.dart
  4. 4
      packages/neon/neon_notes/lib/routes.dart
  5. 4
      packages/neon/neon_notifications/lib/routes.dart

9
packages/neon/neon/lib/src/utils/app_route.dart

@ -4,9 +4,11 @@ import 'package:go_router/go_router.dart';
/// [RouteData] for the initial page of an app.
///
/// Subclasses must override one of [build] or [redirect].
/// Routes should be prefixed with [appsBaseRoutePrefix].
@immutable
abstract class NeonAppRoute extends GoRouteData {
const NeonAppRoute();
abstract class NeonBaseAppRoute extends GoRouteData {
/// Creates a new app base route.
const NeonBaseAppRoute();
@override
Page<void> buildPage(final BuildContext context, final GoRouterState state) => NoTransitionPage(
@ -14,4 +16,5 @@ abstract class NeonAppRoute extends GoRouteData {
);
}
const appsRoutePrefix = '/apps/';
/// Prefix for [NeonBaseAppRoute]s.
const appsBaseRoutePrefix = '/apps/';

4
packages/neon/neon_files/lib/routes.dart

@ -7,11 +7,11 @@ import 'package:neon_files/neon_files.dart';
part 'routes.g.dart';
@TypedGoRoute<FilesAppRoute>(
path: '$appsRoutePrefix${AppIDs.files}',
path: '$appsBaseRoutePrefix${AppIDs.files}',
name: AppIDs.files,
)
@immutable
class FilesAppRoute extends NeonAppRoute {
class FilesAppRoute extends NeonBaseAppRoute {
const FilesAppRoute();
@override

4
packages/neon/neon_news/lib/routes.dart

@ -7,11 +7,11 @@ import 'package:neon_news/neon_news.dart';
part 'routes.g.dart';
@TypedGoRoute<NewsAppRoute>(
path: '$appsRoutePrefix${AppIDs.news}',
path: '$appsBaseRoutePrefix${AppIDs.news}',
name: AppIDs.news,
)
@immutable
class NewsAppRoute extends NeonAppRoute {
class NewsAppRoute extends NeonBaseAppRoute {
const NewsAppRoute();
@override

4
packages/neon/neon_notes/lib/routes.dart

@ -7,11 +7,11 @@ import 'package:neon_notes/neon_notes.dart';
part 'routes.g.dart';
@TypedGoRoute<NotesAppRoute>(
path: '$appsRoutePrefix${AppIDs.notes}',
path: '$appsBaseRoutePrefix${AppIDs.notes}',
name: AppIDs.notes,
)
@immutable
class NotesAppRoute extends NeonAppRoute {
class NotesAppRoute extends NeonBaseAppRoute {
const NotesAppRoute();
@override

4
packages/neon/neon_notifications/lib/routes.dart

@ -7,11 +7,11 @@ import 'package:neon_notifications/neon_notifications.dart';
part 'routes.g.dart';
@TypedGoRoute<NotificationsAppRoute>(
path: '$appsRoutePrefix${AppIDs.notifications}',
path: '$appsBaseRoutePrefix${AppIDs.notifications}',
name: AppIDs.notifications,
)
@immutable
class NotificationsAppRoute extends NeonAppRoute {
class NotificationsAppRoute extends NeonBaseAppRoute {
const NotificationsAppRoute();
@override

Loading…
Cancel
Save