0

this is my issue:

I have a GridView.count with a List.generate as children. Basically I have a grid of maps made with google_maps_flutter and I want to give each of them a corner radius but it applies only to the last element of my list , I've tried putting corner radius everywhere:

  1. inside a box decoration wrapping my elements inside a container, various tries never worked.
  2. wrapping in a clipRRect, still applies only for the last element.
  3. giving to my custom widget Map a corner radius, still applies only for the last element.

I think it is a render problem, when I run my app on a physical device and not the simulator, it works well for every cell in android, but in iOS there is still the problem. please help. problem

start of the list

I want all the cells to have a border radius

code

J quali
  • 1
  • 1

2 Answers2

0

Try using clipBehavior

ClipRRect{
  clipBehavior: Clip.antiAliasWithSaveLayer,
  child: ...
}
RAT101
  • 26
  • 1
  • 6
0

Try this

Card(
  clipBehavior: ...,
  shape: RoundedRectangleBorder(
    borderRadius: BorderRadius.circular(8),
  ),
......
)
RAT101
  • 26
  • 1
  • 6