Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove the elevation (shadow) in a SearchDelegate?

Tags:

flutter

I want to remove the shadow from the search bar when using SearchDelegate but I can't find how to. Any tips?

Screenshot

This is basically all the code:

showSearch(
  context: context,
  delegate: CustomSearchDelegate(),
);

CustomSearchDelegate() just contains an empty search delegate widget/class.

like image 580
carlmagnus Avatar asked Oct 28 '25 10:10

carlmagnus


1 Answers

@override
  ThemeData appBarTheme(BuildContext context) {
    return super.appBarTheme(context).copyWith(
      appBarTheme: super.appBarTheme(context).appBarTheme.copyWith(
        elevation: 0.0,
      ),
    );
  }
like image 130
itheamc Avatar answered Oct 30 '25 01:10

itheamc



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!