Skip to content

Color picker should const if it is originally const #5068

@normidar

Description

@normidar

Is your feature request related to a problem? Please describe.
I'm always frustrated when used color picker.

Describe the solution you'd like
After pick color, make color const if it is originally const.

Describe alternatives you've considered
Maybe close to #4978

Additional context

My class:

class ColorList {
  const ColorList({
    this.color = const Color.fromARGB(255, 182, 134, 153), // The default value of an optional parameter must be constant.
  });
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    in flutterRelates to running Flutter appsin lsp/analysis serverSomething to be fixed in the Dart analysis serveris bugrelies on sdk changesSomething that requires changes in the Dart/Flutter SDK to ship before it will become available

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions