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")をパラメータのアノテーションとして記述します。

nameNullにした場合はパラメーターの名前そのもの、つまりuserIdが利用されます。

@PagePath("/user/:user_id")
class Test extends StatelessWidget {
  const Test({
    @ParaParam("user_id") required String userId,
    super.key
  });

}
Available Extensions

Constructors

PageParam([String? name])
Annotation to map each widget parameter to a variable in the page root.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
name String?
Name of parameter.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

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