Skip to content

[dart-dio] Fix dart-dio generator docs: parameter name "extras" should be "extra" #21472

Open
@AndrewDongminYoo

Description

@AndrewDongminYoo

Is your feature request related to a problem? Please describe.

When generating API client code with the Dart-Dio generator, the DartDoc for request options lists a parameter named extras, but the actual generated parameter is called extra. This causes broken references in IDE tooltips and confuses end users:

/// * [extras] - Can be used to add flags to the request >>>> INFO: The referenced name isn't visible in scope.
/// …
Future<Response<String>> appHelloWorld({
  // …
  Map<String, dynamic>? extra,
  // …
})

Describe the solution you’d like

Update the dart-dio generator template so that the DartDoc uses extra (singular) to match the actual parameter name. This will restore correct IDE references and keep documentation accurate.

Describe alternatives you’ve considered

As a workaround, users must manually edit every generated client to replace extras with extra in comments, or ignore the broken link in their IDE.

Additional context

This appears in lib/src/api/*.dart wherever the generator adds:

/// * [extras] - Can be used to add flags to the request

but the constructor signature and Options.extra usage always expect extra.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions