AppRoute constructor
const
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を付与して定義されたすべてのページが自動的に定義されルーティングが可能になります。
@appRoute
final appRouter = AutoRouter();
void main(){
runApp(
MaterialApp.router(
routerConfig: appRouter,
title: "Application",
);
);
}
Implementation
const AppRoute();