Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add shadow onto SearchBar #26

Open
alexxcheung opened this issue Apr 9, 2020 · 3 comments
Open

Add shadow onto SearchBar #26

alexxcheung opened this issue Apr 9, 2020 · 3 comments

Comments

@alexxcheung
Copy link

Is it possible to enhance the option of searchBarStyle? Because at the moment, it only enable people to change the background color, padding, border radius, which is not enough to have a better UI.

@savadmv
Copy link

savadmv commented Jul 8, 2020

Yes Just like this 👇
0

@adschi
Copy link

adschi commented Nov 10, 2020

@savadmv how you did that?

@jarrodmedrano
Copy link

jarrodmedrano commented Jun 10, 2021

Flexible( child: Container( child: SearchBar<Asset>( onSearch: search, onCancelled: cancelSearch, shrinkWrap: true, hintText: "Asset Barcode", searchBarStyle: SearchBarStyle( backgroundColor: Colors.white, padding: EdgeInsets.all(10), borderRadius: BorderRadius.circular(2), ), onItemFound: (Asset asset, int index) { return ListTile( title: Text(asset.assetTypeName), subtitle: Text(asset.barcode), ); }), decoration: BoxDecoration( border: Border.all( width: 2.0, color: Colors.blue, style: BorderStyle.solid), boxShadow: [ BoxShadow( color: Colors.grey.withOpacity(0.5), spreadRadius: 1, blurRadius: 1, offset: Offset.zero), ], ), ))

@savadmv how you did that?

I wrap it in a container and add a shadow to that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants