1

I have issue on any Samsung Device in Product page in give a container border dynamic odd and even calculation base but scrolling up and down that time break border on samsung mobile.


container give static ( All side ) border working fine but that time combine ( Join ) top and bottom border and left and right border and show border as light and dark. 
How to fix it.

decoration: BoxDecoration(border: Border.all(width: 0.5, color: Theme.of(context).dividerColor),color: Colors.transparent),

package : flutter_staggered_grid_view: ^0.6.2


issue video link : https://drive.google.com/file/d/1BDwSPrgBx070rWS2oOeLBZR832YBqyFv/view?usp=sharing



AlignedGridView.count(

                                controller: _controller,
                                primary: false,
                                shrinkWrap: true,
                                crossAxisCount: orientation == Orientation.portrait ? 2 : 4,
                                mainAxisSpacing: 0,
                                crossAxisSpacing: 0,
                                itemCount: paginationProvider.photos.length,
                                itemBuilder: (context, index) {

                                  final border1 = index.isEven
                                      ? Border(
                                    top: index == 0 || index == 1 ? border : BorderSide.none,
                                    left: border,
                                    right: border,
                                    bottom: border,
                                  )
                                  : Border(top: index == 0 || index == 1 ? border : BorderSide.none, right: border, bottom: border);

                                  buyNowLoaded.add(false);
                                  cartNowLoaded.add(false);
                                  wishlistLoader.add(false);

                                  specialPriceFoundCategoriesProduct.add("0.0");
                                  // List<dynamic> newList=[];
                                  for(int i = 0 ; i < paginationProvider.photos[index].customAttributes!.length;i++)
                                  {
                                    if(paginationProvider.photos[index].customAttributes![i].attributeCode == 'special_price')
                                    {
                                      specialPriceFoundCategoriesProduct[index] = paginationProvider.photos[index].customAttributes![i].value;
                                      break;
                                    }
                                  }
                                  if (index == paginationProvider.photos.length) {
                                    return const Center(
                                      child: CircularProgressIndicator(),
                                    );
                                  }
                                  return Container(
                                    decoration:  BoxDecoration(border: border1),
                              
                                    child: Container(),
                                  );
                                },
                              ),

0 Answers0