queryParam top-level constant

QueryParam const queryParam

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 = QueryParam();