Home > Back-end >  How to put two parallel flutter lists in a column
How to put two parallel flutter lists in a column

Time:04-13

I wanna put two parallel lists inside the row marked in the picture. I've tried different types of structures, but all give me problems. Each element of the dynamic lists will have a picture and a Text. enter image description here

Please refer to below code

 Row(
                                crossAxisAlignment: CrossAxisAlignment.start,
                                mainAxisAlignment:
                                    MainAxisAlignment.spaceBetween,
                                children: [
                                  Flexible(
                                    child: Column(
                                      crossAxisAlignment:
                                          CrossAxisAlignment.start,
                                      children: [
                                        ListView.builder(
                                          physics:
                                              NeverScrollableScrollPhysics(),
                                          shrinkWrap: true,
                                          itemCount: 15,
                                          itemBuilder: (BuildContext context,
                                              int index) {
                                            return ListTile(
                                              leading: Icon(
                                                Icons.star_border,
                                              ),
                                              title: Text(
                                                'List $index'  
                                                    "Lorem ipsum dolor sit amet, ",
                                              ),
                                            );
                                          },
                                        ),
                                      ],
                                    ),
                                  ),
                                  Flexible(
                                    child: Padding(
                                      padding: EdgeInsets.only(left: 15.0),
                                      child: Column(
                                        crossAxisAlignment:
                                            CrossAxisAlignment.start,
                                        children: [
                                          ListView.builder(
                                            physics:
                                                NeverScrollableScrollPhysics(),
                                            shrinkWrap: true,
                                            itemCount: 15,
                                            itemBuilder: (BuildContext context,
                                                int index) {
                                              return Row(
                                                children: [
                                                  Icon(
                                                    Icons.star,
                                                  ),
                                                  Text("List item $index"),
                                                ],
                                              );
                                            },
                                          ),
                                        ],
                                      ),
                                    ),
                                  )
                                ],
                              ),
                                                        
  • Related