Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove top border of persistentFooterButtons in flutter

I'm using persistentFooterButtons and i wanna remove the top border of its. Anyone knows how ?

My code:

 persistentFooterButtons: [
        Center(
          child: TextButton(
            style: ButtonStyle(
              
            ),
              onPressed: () {
                print("press the filter btn");
              },
              child: Text("Filter")),
        )
      ],

enter image description here

like image 499
ninoorta Avatar asked Feb 02 '26 05:02

ninoorta


1 Answers

You could do something like this:

Theme(
  data: Theme.of(context).copyWith(
    dividerColor: Colors.transparent,
  ),
  child: Scaffold(
    body: Text("Body"),
    persistentFooterButtons: [
      Center(
        child: TextButton(
          style: ButtonStyle(),
          onPressed: () {
            print("press the filter btn");
          },
          child: Text("Filter"),
        ),
      ),
    ],
  ),
);

dividerColor: Colors.transparent, sets the divider / top border to transparent

like image 164
Eric Aig Avatar answered Feb 04 '26 23:02

Eric Aig



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!