29

I'm trying to create an outlined filter chip in Flutter.

I can create a standard filter chip using the following code but I can't see a way to access the outlined version as shown in the image.

Is there a way to modify the standard chip to give the outline version?

FilterChip(
   label: Text("text"), 
   onSelected: (bool value) {print("selected");},
),

Material Design Filter Chips

nuxibyte
  • 1,434
  • 1
  • 13
  • 16

1 Answers1

71

I have it working now. Here is the code:

FilterChip(
    label: Text("text"), 
    backgroundColor: Colors.transparent,
    shape: StadiumBorder(side: BorderSide()),
    onSelected: (bool value) {print("selected");},
),

This post also helped me discover the StadiumBorder.

nuxibyte
  • 1,434
  • 1
  • 13
  • 16