Flutter Divider color is not expected when thickness is low

27 Views Asked by At

code:

    Divider(
      color: Color(0xffd2d2d2),
      thickness: 0.5,
      indent: indent,
      endIndent: endIndent,
    );

thickness: 10

thickness10

RGB(210,210,210) 0xffd2d2d2 which is expected

thickness: 0.5

thickness0.5

RGB(235,235,235)

how can i maintain the expected color when Divider thickness is 0.5

1

There are 1 best solutions below

1
A-E On

I think getting thicker doesn't mean getting more transparency, if it's so.

Make your custom divider:

Container(width: double.infinity, height: 0.5 , color: Color(0xffd2d2d2),),

but the results looks similar:

enter image description here

code: here