PagePath class
Annotation defining the page.
Specify the path of the page in path as it is.
When redirect is set, it is possible to write reroute settings for only that page.
You can give a name to a page by specifying name, and you can bind an object (including enums, etc.) to a page by specifying key. All of these can be obtained from RouteQuery
.
ページを定義するアノテーション。
pathにページのパスをそのまま指定します。
redirectを設定するとそのページのみに対応するリルート設定を記述することが可能です。
nameを指定することでページに名前をつけることができ、keyを指定することでページにオブジェクト(enumなども含む)を紐付けることが可能です。これらはすべてRouteQuery
から取得することができます。
@PagePath("/test")
class TestWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text("Test")),
body: Center(child: Text("Body")),
);
}
}
- Available Extensions
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- implementType → Type?
-
Specify a class that extends
RouteQueryBuilder
to enable page swapping.final - key → Object?
-
Key object of the page.
final
- name → String?
-
Page Name.
final
- path → String
-
Page path.
final
-
redirect
→ List<
Object> -
Reroute settings.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- transition → Object?
-
Specifies page transitions.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited