Skip to content

buildQueryLines should use pattern matching rather than null assertions #41

@brianquinlan

Description

@brianquinlan

The generated code would change like:

-      if (request.filter != null) 'filter': request.filter!,
+      if (request.filter case final filter?) 'filter': filter,

See https://github.com/googleapis/librarian/blob/bcb914ac67afc3df0e28483e20dcc9232b42e1c5/internal/sidekick/internal/dart/annotate.go#L789

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions