Skip to content

Support coloured gutter icons for Color.fromARGB/RGBO() #2218

@benthillerkus

Description

@benthillerkus

This could be useful since the shorter Color(int value) constructor not only takes up less space, but also because the extension generates small color swatches on the left hand side when such a constructor is being used. The conversion is easy to do, but pretty laborious per hand as the opacity needs to be first scaled into a 0-255 range and then converted into hex.

The output would look like this:
before: Color.fromRGBO(78, 63, 93, .1)
after: const Color(0x1A4E3F5D)

So this would generally help with refactoring and cleaning up by saving time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    in editorRelates to code editing or language featuresin flutterRelates to running Flutter appsis enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions