Remove SliverAppBar bottom border – Flutter

Issue

enter image description here

I wanna remove the border that I highlighted in the above picture. I couldn’t find any solution to fix this 🙁

here is my SliverAppBar Code :

NestedScrollView(
        headerSliverBuilder: (BuildContext ctx, isScrolled) {
            return <Widget>[
               SliverAppBar(
                  title: Text('Applying to this job opportunity'),
                  pinned: true,
                  titleSpacing: 0,
                  floating: true,
                  expandedHeight: 180,
                  flexibleSpace: //some widgets
             )
        ]
    }
)

Solution

Just set the elevation property to 0.

 SliverAppBar(
                  title: Text('Applying to this job opportunity'),
                  pinned: true,
                  elevation: 0,
                  titleSpacing: 0,
                  floating: true,
                  expandedHeight: 180,
                  flexibleSpace: //some widgets
             )

More info : https://api.flutter.dev/flutter/material/SliverAppBar/elevation.html

Answered By – diegoveloper

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published