PageParam class
Annotation to map each widget parameter to a variable in the page root.
Write @ParaPathParam(\"user_id\")
as a parameter annotation to link the user_id
in the path to the class argument userId
as in the example below.
If name is set to Null, the parameter name itself, i.e. userId
, is used.
各ウィジェットのパラメーターとページのルートの変数を対応するためのアノテーション。
下記の例のようにパス内のuser_id
をクラス引数のuserId
に紐付けるために@ParaPathParam("user_id")
をパラメータのアノテーションとして記述します。
nameをNullにした場合はパラメーターの名前そのもの、つまりuserId
が利用されます。
@PagePath("/user/:user_id")
class Test extends StatelessWidget {
const Test({
@ParaParam("user_id") required String userId,
super.key
});
}
- Available Extensions
Constructors
Properties
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