QueryParam constructor
const
QueryParam([
- String? name
Annotation to map each widget parameter to a query parameter in the page path.
For example, if a request is made with the path /search?q=text
in the following case, the text
character is passed to query
.
各ウィジェットのパラメーターとページパスのクエリーパラメーターを対応するためのアノテーション。
例えば下記の場合/search?q=text
というパスでリクエストが行われた場合、text
の文字がquery
に渡されます。
@PagePath("/search")
class Test extends StatelessWidget {
const Test({
@QueryParam("q") required String query,
super.key
});
}
Implementation
const QueryParam([this.name]);