Add TestAds Between ListView.Saparated


I am Working In a Small Project where I want to display ads between Listview in the 6th column. So, I made use of listview.separate but, All the ads are being shown after each Column. I am Using flutter_admob_admob package for displaying native ads.

I want the OutPut as Following : [1]:


                      physics: ClampingScrollPhysics(),
                      shrinkWrap: true,
                      // Add Ads here
                      separatorBuilder: (BuildContext context, int index) {
                        return Container(
                          height: 250.0,
                          child: NativeAdmob(
                            adUnitID: _adunitID,
                            controller: nativecontroller,
                            type: NativeAdmobType.full,
                            error: CupertinoActivityIndicator(),
                      itemBuilder: (BuildContext context, int index) {
                        DocumentSnapshot captions =
                        return Padding(
                          padding: EdgeInsets.symmetric(
                            horizontal: 10.0,
                            vertical: 5.0,
                          child: Container(
                            decoration: BoxDecoration(
                              border: Border.all(color: Colors.black12),
                              borderRadius: BorderRadius.circular(10),
                            child: Column(
                              children: <Widget>[
                                  decoration: BoxDecoration(
                                    color: Color(0xffFFFFFF),
                                    borderRadius: BorderRadius.only(
                                      topLeft: Radius.circular(10),
                                      topRight: Radius.circular(10),
                                  padding: EdgeInsets.symmetric(
                                    horizontal: 15.0,
                                    vertical: 15.0,
                                  width: MediaQuery.of(context).size.width,
                                  child: Text(
                                    style: GoogleFonts.poppins(
                                      color: Colors.black87,
                                      fontSize: 15.0,
asked on Stack Overflow Jul 8, 2020 by Jeevan Crasta

0 Answers

Nobody has answered this question yet.

User contributions licensed under CC BY-SA 3.0