-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(katana_router_annotation):Added annotation for appRoute.
- Loading branch information
Showing
1 changed file
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
} |