Android Studio where is color picker for Flutter plugin

6,060

Solution 1

The color picker is not clickable in Android Studio running Flutter( Dart code), see picture below. But i found a work around using the Color class and manually opening color picker. Then pick a color and copy/paste it like this:

Color class

Here is how i do it:

1. Double tap shift to run search

Search icon

2. Type Color or Picker Search list

3. Open Color Picker from the search list

Color Picker

4. Copy/paste the HEX color code into your color class.

Expert tip:

Add color picker to a keyboard shortcut. You can find the settings for Keymap, under File > Settings > Keymap enter image description here

Solution 2

You must have heard of the materials.io website from google, which provides many materials like designs, icons, tools, resources and components for easy developing. Now Color Tool is also available. You must add the website to your browsers shortcut if you are a developer. Here's the link for chosing color : https://www.material.io/resources/color/#!/?view.left=0&view.right=0&primary.color=E91E63

Another way I found is :

  1. Type 'Colors.' and press control+space to see the available colors.
  2. Select the color using arrow or mouse.
  3. Press control+Q for the quick documentation.
  4. And on the documentation windows, click on the edit button which opens the 'colors.dart' file.

Here all the colors with all shades are available. These shortcuts are for windows. Once you open the file, you can always come back here to chose the next shade. But will not be the comfortable method like android project.

Hope a easier way to do this will come with the later update.

Share:
6,060
Admin
Author by

Admin

Updated on December 07, 2022

Comments

  • Admin
    Admin over 1 year

    In Android Studio, we have color picker when developing in Java/Kotlin (natively) like this.

    enter image description here

    But while developing for Flutter, I can't see any options to pick my own color. Is there some plugin required to do that?