Skip to content

Commit

Permalink
feat(katana_router_annotation):Added annotation for appRoute.
Browse files Browse the repository at this point in the history
  • Loading branch information
mathrunet committed Oct 14, 2022
1 parent ffe4a8e commit 0a6238b
Showing 1 changed file with 64 additions and 0 deletions.
64 changes: 64 additions & 0 deletions packages/katana_router_annotation/lib/src/app_route.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
part of katana_router_annotation;

/// Automatically generates routing for the entire application.
/// アプリケーション全体のルーティングを自動生成します。
///
/// By adding this annotation to the global field as shown in the example below, all pages defined with @PagePath will be automatically defined and routable in the application.
/// 下記の例のようにグローバルのフィールドにこのアノテーションを付与することでアプリケーション内で@PagePathを付与して定義されたすべてのページが自動的に定義されルーティングが可能になります。
///
/// ```dart
/// @appRoute
/// final appRouter = _$AppRouter();
///
/// void main(){
/// runApp(
/// MaterialApp.router(
/// routerConfig: appRouter,
/// title: "Application",
/// );
/// );
/// }
/// ```
const appRoute = AppRoute();

/// Automatically generates routing for the entire application.
/// アプリケーション全体のルーティングを自動生成します。
///
/// By adding this annotation to the global field as shown in the example below, all pages defined with @PagePath will be automatically defined and routable in the application.
/// 下記の例のようにグローバルのフィールドにこのアノテーションを付与することでアプリケーション内で@PagePathを付与して定義されたすべてのページが自動的に定義されルーティングが可能になります。
///
/// ```dart
/// @appRoute
/// final appRouter = _$AppRouter();
///
/// void main(){
/// runApp(
/// MaterialApp.router(
/// routerConfig: appRouter,
/// title: "Application",
/// );
/// );
/// }
/// ```
class AppRoute {
/// Automatically generates routing for the entire application.
/// アプリケーション全体のルーティングを自動生成します。
///
/// By adding this annotation to the global field as shown in the example below, all pages defined with @PagePath will be automatically defined and routable in the application.
/// 下記の例のようにグローバルのフィールドにこのアノテーションを付与することでアプリケーション内で@PagePathを付与して定義されたすべてのページが自動的に定義されルーティングが可能になります。
///
/// ```dart
/// @appRoute
/// final appRouter = _$AppRouter();
///
/// void main(){
/// runApp(
/// MaterialApp.router(
/// routerConfig: appRouter,
/// title: "Application",
/// );
/// );
/// }
/// ```
const AppRoute();
}

0 comments on commit 0a6238b

Please sign in to comment.