Skip to content

[go_router_builder] List, Set (and Iterable?) types should be supported  #108437

@ValentinVignal

Description

@ValentinVignal

Use case

This issue (#108390) mentions that :

When writing a url to a page that has to perform a research with some filters these are typically mapped to query params.
Sometimes a filter maps to a list of values. Query params lists are supported by http protocol and by dart Uri for this specific use case.

Ex.: /my-app-home/resource?color=red&size=1&size=2&size=3

But List, Set (and Iterable) are not supported types by go_router_builder:

The builder will throw an error:

The parameter type `List<String>` is not supported.
package:go_router_builder_example/all_types.dart:40:10
   ╷
40 │     this.stringListField,
   │          ^^^^^^^^^^^^^^^

Proposal

Among with the already supported types (T), it would be useful to support List<T>, Set<T> (and Iterable<T>?).

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectc: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Flutterp: go_router_builderThe go_router_builder packagepackageflutter/packages repository. See also p: labels.r: fixedIssue is closed as already fixed in a newer version

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions