Reputation: 293
I want search bar in a rectangle shape, but corner should be slightly rounded. by default its corder are too rounded. anyone can help me to make its corner customisable. Below is the code I tried.
SearchBar(
leading: Icon(Icons.search),
hintText: "Search by ID, Store name & etc",
shape: MaterialStatePropertyAll<OutlinedBorder>(CircleBorder()),
),
),
Upvotes: 1
Views: 892
Reputation: 21
Use this instead and customize the border radius according to your preferences:
shape: WidgetStatePropertyAll(
RoundedRectangleBorder()
),
Upvotes: 2