flappy_search_bar icon indicating copy to clipboard operation
flappy_search_bar copied to clipboard

Add shadow onto SearchBar

Open alexxcheung opened this issue 5 years ago • 3 comments

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.

alexxcheung avatar Apr 09 '20 13:04 alexxcheung

Yes Just like this 👇 0

savadmv avatar Jul 08 '20 06:07 savadmv

@savadmv how you did that?

adschi avatar Nov 10 '20 14:11 adschi

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.

jarrodmedrano avatar Jun 10 '21 20:06 jarrodmedrano