name property

String? name
final

The name of the parameter in the URI.

If null, the kebab-case version of the parameter name will be used.

For example:

class MyRoute extends GoRouteData with $MyRoute {
  const MyRoute({
    @TypedQueryParameter(name: 'custom_name') this.myParameter,
  });
 final String myParameter;
}

This will result in a route that matches /my-route?custom_name=some_value instead of the default /my-route?my-parameter=some_value.

It is escaped to be URL-safe. For example 'field with space' will generate a query parameter named 'field+with+space'.

Implementation

final String? name;