How to get rid of the leading SliverAppBar icon?

23 views Asked by At

i'm trying to get rid of the leading menu Icon (hamburger Icon), so i put leading to null but still nothing changed, here my code :

CustomScrollView(
              slivers: [
                SliverAppBar(
                  backgroundColor: const Color.fromARGB(255, 214, 212, 209),
                  expandedHeight: 270,
                  floating: true,
                  pinned: false,
                  leading: null,
                  flexibleSpace: FlexibleSpaceBar(
                    background: Padding(
                      padding: const EdgeInsets.all(20),
                      child: Column(
                        mainAxisSize: MainAxisSize.min,
                        crossAxisAlignment: CrossAxisAlignment.start,
                        children: [
                          Text(
                            "Board",
                            style: GoogleFonts.montserrat(fontSize: 25),
                          ),
                          const SizedBox(
                            height: 10,
                          ),
                          _buildSearchTextFormField(),
                          const SizedBox(
                            height: 10,
                          ),
                          Row(
                            mainAxisAlignment: MainAxisAlignment.spaceBetween,
                            children: [
                              Text(
                                "Status",
                                style: GoogleFonts.montserrat(fontSize: 18),
                              ),
                              GestureDetector(
                                onTap: () {},
                                child: const Icon(
                                    CupertinoIcons.slider_horizontal_3),
                              )
                            ],
                          ),
                          const SizedBox(
                            height: 10,
                          ),
                          _buildStatusList(),
                        ],
                      ),
                    ),
                  ),
                ),
                SliverToBoxAdapter(
                  child: Padding(
                    padding: const EdgeInsets.all(8.0),
                    child: Container(
                      height: 200,
                      decoration: const BoxDecoration(color: Colors.amber),
                    ),
                  ),
                ),
                SliverToBoxAdapter(
                  child: Padding(
                    padding: const EdgeInsets.all(8.0),
                    child: Container(
                      height: 200,
                      decoration: const BoxDecoration(color: Colors.amber),
                    ),
                  ),
                ),
                SliverToBoxAdapter(
                  child: Padding(
                    padding: const EdgeInsets.all(8.0),
                    child: Container(
                      height: 200,
                      decoration: const BoxDecoration(color: Colors.amber),
                    ),
                  ),
                ),
                SliverToBoxAdapter(
                  child: Padding(
                    padding: const EdgeInsets.all(8.0),
                    child: Container(
                      height: 200,
                      decoration: const BoxDecoration(color: Colors.amber),
                    ),
                  ),
                ),
                SliverToBoxAdapter(
                  child: Padding(
                    padding: const EdgeInsets.all(8.0),
                    child: Container(
                      height: 200,
                      decoration: const BoxDecoration(color: Colors.amber),
                    ),
                  ),
                ),
                SliverToBoxAdapter(
                  child: Padding(
                    padding: const EdgeInsets.all(8.0),
                    child: Container(
                      height: 200,
                      decoration: const BoxDecoration(color: Colors.amber),
                    ),
                  ),
                )
              ],
            )
1

There are 1 answers

0
Hamou Ouyaba On BEST ANSWER

Well thanx to @Cabdirashiid for pointing that i may have a drawer which was actaully the case, now i fixed the issue by putting :

leading: Container(),

instead of :

leading: null,