Skip to content

Convert RandomColor.getColor() to Color class #9

@calvinzhe

Description

@calvinzhe

I am having issues converting RandomColor.getColor(), which is of type string formatted depending on the options, to a Color class.

The Color() object can covert a hex data type to color, but not a string formatted as a hex, so roundabout solution is to write a new function to automatically do this (https://stackoverflow.com/questions/49835146/how-to-convert-flutter-color-to-string-and-back-to-a-color) or use another package (like https://pub.dev/documentation/string_to_hex/latest/).

It would be nice if the RandomColor package can already do this built-in.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions