Skip to content

Prioritize creating 'final' variables in 'Introduce Variable' refactoring #8783

Description

@danielgomezrico

The feature "Introduce Variable" ends up creating a var variable instead of a final.

It would be cool if it prioritized the final and set it as final first.

Current Behavior:

Something.initialize(
      resourceAttributes:{'any': 123},
);

Becomes:

var attributes = {'any': config.environment};

Something.initialize(resourceAttributes: attributes);

Desired Behavior:

It should generate:

final attributes = {'any': 123};

Something.initialize(resourceAttributes: attributes);

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions